X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fresize%2Fplugin.js;h=24ba09ca7361d41b650616d700ea89d78eda595b;hb=refs%2Ftags%2Fv3.5.3;hp=6f31bd3af58a07856154314070493b1c42b7e23e;hpb=055b6b0792ce7dc53d47af606b367c04b927c2ab;p=ckeditor.git diff --git a/_source/plugins/resize/plugin.js b/_source/plugins/resize/plugin.js index 6f31bd3..24ba09c 100644 --- a/_source/plugins/resize/plugin.js +++ b/_source/plugins/resize/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -9,6 +9,10 @@ CKEDITOR.plugins.add( 'resize', { var config = editor.config; + // Resize in the same direction of chrome, + // which is identical to dir of editor element. (#6614) + var resizeDir = editor.element.getDirection( 1 ); + !config.resize_dir && ( config.resize_dir = 'both' ); ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 ); ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 ); @@ -31,7 +35,7 @@ CKEDITOR.plugins.add( 'resize', dy = evt.data.$.screenY - origin.y, width = startSize.width, height = startSize.height, - internalWidth = width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ), + internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ), internalHeight = height + dy; if ( resizeHorizontal ) @@ -83,15 +87,22 @@ CKEDITOR.plugins.add( 'resize', if ( event.data.space == 'bottom' ) { var direction = ''; - if ( resizeHorizontal && !resizeVertical) + if ( resizeHorizontal && !resizeVertical ) direction = ' cke_resizer_horizontal'; - if ( !resizeHorizontal && resizeVertical) + if ( !resizeHorizontal && resizeVertical ) direction = ' cke_resizer_vertical'; - event.data.html += '
'; + + // Always sticks the corner of botttom space. + resizeDir == 'ltr' && direction == 'ltr' ? + event.data.html += resizerHtml : + event.data.html = resizerHtml + event.data.html; } }, editor, null, 100 ); }