/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
{\r
var config = editor.config;\r
\r
+ // Resize in the same direction of chrome,\r
+ // which is identical to dir of editor element. (#6614)\r
+ var resizeDir = editor.element.getDirection( 1 );\r
+\r
!config.resize_dir && ( config.resize_dir = 'both' );\r
( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 );\r
( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 );\r
dy = evt.data.$.screenY - origin.y,\r
width = startSize.width,\r
height = startSize.height,\r
- internalWidth = width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ),\r
+ internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ),\r
internalHeight = height + dy;\r
\r
if ( resizeHorizontal )\r
if ( event.data.space == 'bottom' )\r
{\r
var direction = '';\r
- if ( resizeHorizontal && !resizeVertical)\r
+ if ( resizeHorizontal && !resizeVertical )\r
direction = ' cke_resizer_horizontal';\r
- if ( !resizeHorizontal && resizeVertical)\r
+ if ( !resizeHorizontal && resizeVertical )\r
direction = ' cke_resizer_vertical';\r
\r
- event.data.html += '<div class="cke_resizer' + direction + '"' +\r
+ var resizerHtml =\r
+ '<div' +\r
+ ' class="cke_resizer' + direction + ' cke_resizer_' + resizeDir + '"' +\r
' title="' + CKEDITOR.tools.htmlEncode( editor.lang.resize ) + '"' +\r
' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' +\r
'></div>';\r
+\r
+ // Always sticks the corner of botttom space.\r
+ resizeDir == 'ltr' && direction == 'ltr' ?\r
+ event.data.html += resizerHtml :\r
+ event.data.html = resizerHtml + event.data.html;\r
}\r
}, editor, null, 100 );\r
}\r