Changeset 27694
- Timestamp:
- 03/25/2014 12:15:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
r27693 r27694 669 669 editor.on( 'ObjectResized', function( event ) { 670 670 var parent, width, 671 node = event.target; 671 node = event.target, 672 dom = editor.dom; 672 673 673 674 if ( node.nodeName === 'IMG' ) { 674 if ( parent = editor.dom.getParent( node, '.wp-caption' ) ) { 675 width = event.width || editor.dom.getAttrib( node, 'width' ); 675 node.className = node.className.replace( /\bsize-[^ ]+/, '' ); 676 677 if ( parent = dom.getParent( node, '.wp-caption' ) ) { 678 width = event.width || dom.getAttrib( node, 'width' ); 676 679 677 680 if ( width ) { … … 682 685 } 683 686 684 editor.dom.setStyle( parent, 'width', width + 'px' );687 dom.setStyle( parent, 'width', width + 'px' ); 685 688 } 686 689 }
Note: See TracChangeset
for help on using the changeset viewer.