- var dx = evt.data.$.screenX - origin.x;\r
- var dy = evt.data.$.screenY - origin.y;\r
- var internalWidth = startSize.width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 );\r
- var internalHeight = startSize.height + dy;\r
+ var dx = evt.data.$.screenX - origin.x,\r
+ dy = evt.data.$.screenY - origin.y,\r
+ width = startSize.width,\r
+ height = startSize.height,\r
+ internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ),\r
+ internalHeight = height + dy;\r
+\r
+ if ( resizeHorizontal )\r
+ width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) );\r