Ticket #4779: 4779_2.patch
File 4779_2.patch, 3.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/resize/plugin.js
9 9 { 10 10 var config = editor.config; 11 11 12 if ( config.resize_enabled ) 12 !config.resize_dir && ( config.resize_dir = 'both' ); 13 ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 ); 14 ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 ); 15 ( config.resize_minWidth == undefined ) && ( config.resize_minWidth = 750 ); 16 ( config.resize_minHeight == undefined ) && ( config.resize_minHeight = 250 ); 17 18 if ( config.resize_enabled !== false ) 13 19 { 14 20 var container = null, 15 21 origin, … … 57 63 startSize = { width : container.$.offsetWidth || 0, height : container.$.offsetHeight || 0 }; 58 64 origin = { x : $event.screenX, y : $event.screenY }; 59 65 66 config.resize_minWidth > startSize.width && ( config.resize_minWidth = startSize.width ); 67 config.resize_minHeight > startSize.height && ( config.resize_minHeight = startSize.height ); 68 60 69 CKEDITOR.document.on( 'mousemove', dragHandler ); 61 70 CKEDITOR.document.on( 'mouseup', dragEndHandler ); 62 71 … … 91 100 92 101 /** 93 102 * The minimum editor width, in pixels, when resizing it with the resize handle. 103 * Note: It fallbacks to editor's actual width if that's smaller than the default value. 104 * @name CKEDITOR.config.resize_minWidth 94 105 * @type Number 95 106 * @default 750 96 107 * @example 97 108 * config.resize_minWidth = 500; 98 109 */ 99 CKEDITOR.config.resize_minWidth = 750;100 110 101 111 /** 102 112 * The minimum editor height, in pixels, when resizing it with the resize handle. 113 * Note: It fallbacks to editor's actual height if that's smaller than the default value. 114 * @name CKEDITOR.config.resize_minHeight 103 115 * @type Number 104 116 * @default 250 105 117 * @example 106 118 * config.resize_minHeight = 600; 107 119 */ 108 CKEDITOR.config.resize_minHeight = 250;109 120 110 121 /** 111 122 * The maximum editor width, in pixels, when resizing it with the resize handle. 123 * @name CKEDITOR.config.resize_maxWidth 112 124 * @type Number 113 125 * @default 3000 114 126 * @example 115 127 * config.resize_maxWidth = 750; 116 128 */ 117 CKEDITOR.config.resize_maxWidth = 3000;118 129 119 130 /** 120 131 * The maximum editor height, in pixels, when resizing it with the resize handle. 132 * @name CKEDITOR.config.resize_maxHeight 121 133 * @type Number 122 134 * @default 3000 123 135 * @example 124 136 * config.resize_maxHeight = 600; 125 137 */ 126 CKEDITOR.config.resize_maxHeight = 3000;127 138 128 139 /** 129 * Whether to enable the resizing feature. If disabled the resize handler will not be visible. 140 * Whether to enable the resizing feature. If disabed the resize handler will not be visible. 141 * @name CKEDITOR.config.resize_enabled 130 142 * @type Boolean 131 143 * @default true 132 144 * @example 133 145 * config.resize_enabled = false; 134 146 */ 135 CKEDITOR.config.resize_enabled = true;136 137 /**138 * The directions to which the editor resizing is enabled. Possible values139 * are "both", "vertical" and "horizontal".140 * @type String141 * @default 'both'142 * @since 3.3143 * @example144 * config.resize_dir = 'vertical';145 */146 CKEDITOR.config.resize_dir = 'both';