Ticket #4231: 4231_3.patch
File 4231_3.patch, 5.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/resize/plugin.js
11 11 12 12 if ( config.resize_enabled ) 13 13 { 14 var container = null; 15 var origin, startSize; 14 var container = null, 15 origin, 16 startSize, 17 resizeHorizontal = ( config.resize_dir == 'both' || config.resize_dir == 'horizontal' ) && 18 ( config.resize_minWidth != config.resize_maxWidth ), 19 resizeVertical = ( config.resize_dir == 'both' || config.resize_dir == 'vertical' ) && 20 ( config.resize_minHeight != config.resize_maxHeight ); 16 21 17 22 function dragHandler( evt ) 18 23 { 19 var dx = evt.data.$.screenX - origin.x; 20 var dy = evt.data.$.screenY - origin.y; 21 var internalWidth = startSize.width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ); 22 var internalHeight = startSize.height + dy; 24 var dx = evt.data.$.screenX - origin.x, 25 dy = evt.data.$.screenY - origin.y, 26 width = startSize.width, 27 height = startSize.height, 28 internalWidth = width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ), 29 internalHeight = height + dy; 23 30 24 editor.resize( Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) ), 25 Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) ) ); 31 if ( resizeHorizontal ) 32 width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) ); 33 34 if ( resizeVertical ) 35 height = Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) ); 36 37 editor.resize( width, height ); 26 38 } 27 39 28 40 function dragEndHandler ( evt ) … … 61 73 { 62 74 if ( event.data.space == 'bottom' ) 63 75 { 64 event.data.html += '<div class="cke_resizer"' + 76 var direction = ''; 77 if ( resizeHorizontal && !resizeVertical) 78 direction = ' cke_resizer_horizontal'; 79 if ( !resizeHorizontal && resizeVertical) 80 direction = ' cke_resizer_vertical'; 81 82 event.data.html += '<div class="cke_resizer' + direction + '"' + 65 83 ' title="' + CKEDITOR.tools.htmlEncode( editor.lang.resize ) + '"' + 66 84 ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' + 67 85 '></div>'; … … 108 126 CKEDITOR.config.resize_maxHeight = 3000; 109 127 110 128 /** 111 * Whether to enable the resizing feature. If disab ed the resize handler will not be visible.129 * Whether to enable the resizing feature. If disabled the resize handler will not be visible. 112 130 * @type Boolean 113 131 * @default true 114 132 * @example 115 133 * config.resize_enabled = false; 116 134 */ 117 135 CKEDITOR.config.resize_enabled = true; 136 137 /** 138 * The directions where resizing is enabled. It can be 'both', 'vertical' or 'horizontal' 139 * @type String 140 * @default 'both' 141 * @since 3.3 142 * @example 143 * config.resize_dir = 'vertical'; 144 */ 145 146 CKEDITOR.config.resize_dir = 'both'; 147 No newline at end of file -
_source/skins/kama/mainui.css
133 133 float: left; 134 134 } 135 135 136 .cke_skin_kama .cke_resizer_horizontal, 137 .cke_skin_kama .cke_rtl .cke_resizer_horizontal 138 { 139 cursor: e-resize; 140 } 141 142 .cke_skin_kama .cke_resizer_vertical, 143 .cke_skin_kama .cke_rtl .cke_resizer_vertical 144 { 145 cursor: n-resize; 146 } 147 136 148 .cke_skin_kama .cke_maximized .cke_resizer 137 149 { 138 150 display: none; -
_source/skins/office2003/mainui.css
93 93 cursor: se-resize; 94 94 } 95 95 96 .cke_skin_office2003 .cke_maximized .cke_resizer97 {98 display: none;99 }100 101 96 .cke_skin_office2003 .cke_rtl .cke_resizer 102 97 { 103 98 cursor: sw-resize; … … 106 101 float: left; 107 102 } 108 103 104 .cke_skin_office2003 .cke_resizer_horizontal, 105 .cke_skin_office2003 .cke_rtl .cke_resizer_horizontal 106 { 107 cursor: e-resize; 108 } 109 110 .cke_skin_office2003 .cke_resizer_vertical, 111 .cke_skin_office2003 .cke_rtl .cke_resizer_vertical 112 { 113 cursor: n-resize; 114 } 115 116 .cke_skin_office2003 .cke_maximized .cke_resizer 117 { 118 display: none; 119 } 120 109 121 .cke_skin_office2003 .cke_browser_ie6 .cke_contents textarea, 110 122 .cke_skin_office2003 .cke_browser_ie7 .cke_contents textarea 111 123 { -
_source/skins/v2/mainui.css
110 110 float: left; 111 111 } 112 112 113 .cke_skin_v2 .cke_resizer_horizontal, 114 .cke_skin_v2 .cke_rtl .cke_resizer_horizontal 115 { 116 cursor: e-resize; 117 } 118 119 .cke_skin_v2 .cke_resizer_vertical, 120 .cke_skin_v2 .cke_rtl .cke_resizer_vertical 121 { 122 cursor: n-resize; 123 } 124 113 125 .cke_skin_v2 .cke_maximized .cke_resizer 114 126 { 115 127 display: none;