Skip to content

Commit 78bf3f1

Browse files
author
Katochimoto
committed
фикс ресайза для режима sandbox
1 parent c3d0c30 commit 78bf3f1

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ckeditor-imgresize",
3-
"version": "1.0.7",
3+
"version": "1.0.9",
44
"main": [
55
"plugin.js"
66
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ckeditor-imgresize",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "CKEditor dragable image resizing with support divarea",
55
"keywords": [
66
"ckeditor",

plugin.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,16 @@
362362
this._startPos = { 'x': nativeEvent.clientX, 'y': nativeEvent.clientY };
363363
this._keys = { 'shift': nativeEvent.shiftKey };
364364

365-
this._editor.document.on('mousemove', this._onMousemove, this, null, 0);
366-
this._editor.document.on('mouseup', this._onMouseup, this, null, 0);
365+
this._document.on('mousemove', this._onMousemove, this, null, 0);
366+
this._document.on('mouseup', this._onMouseup, this, null, 0);
367367

368368
if (this._isIframe) {
369-
this._document.on('mousemove', this._onMousemove, this, null, 0);
370-
this._document.on('mouseup', this._onMouseup, this, null, 0);
369+
this._editor.document.on('mousemove', this._onMousemove, this, null, 0);
370+
this._editor.document.on('mouseup', this._onMouseup, this, null, 0);
371+
372+
} else {
373+
this._editor.container.on('mousemove', this._onMousemove, this, null, 0);
374+
this._editor.container.on('mouseup', this._onMouseup, this, null, 0);
371375
}
372376

373377
this._wrapper.fire('drag:start');
@@ -413,12 +417,16 @@
413417
nativeEvent.stopPropagation();
414418
nativeEvent.preventDefault();
415419

416-
this._editor.document.removeListener('mousemove', this._onMousemove);
417-
this._editor.document.removeListener('mouseup', this._onMouseup);
420+
this._document.removeListener('mousemove', this._onMousemove);
421+
this._document.removeListener('mouseup', this._onMouseup);
418422

419423
if (this._isIframe) {
420-
this._document.removeListener('mousemove', this._onMousemove);
421-
this._document.removeListener('mouseup', this._onMouseup);
424+
this._editor.document.removeListener('mousemove', this._onMousemove);
425+
this._editor.document.removeListener('mouseup', this._onMouseup);
426+
427+
} else {
428+
this._editor.container.removeListener('mousemove', this._onMousemove);
429+
this._editor.container.removeListener('mouseup', this._onMouseup);
422430
}
423431

424432
var delta = this._update(event);

0 commit comments

Comments
 (0)