tui-image-editor
Advanced tools
Comparing version 3.14.1 to 3.14.2
@@ -1,2 +0,2 @@ | ||
// Type definitions for TOAST UI Image Editor v3.14.0 | ||
// Type definitions for TOAST UI Image Editor v3.14.1 | ||
// TypeScript Version: 3.2.2 | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "tui-image-editor", | ||
"author": "NHN. FE Development Lab <dl_javascript@nhn.com>", | ||
"version": "3.14.1", | ||
"version": "3.14.2", | ||
"license": "MIT", | ||
@@ -91,3 +91,3 @@ "repository": { | ||
}, | ||
"gitHead": "41a1d24d8945ac99b2d5d6b5514a827d42929111" | ||
"gitHead": "68e3c491d8d27fc627a9e5cb2549f792c1eab7d0" | ||
} |
@@ -132,2 +132,8 @@ /** | ||
this.graphics.on(OBJECT_MODIFIED, this._stopTextEditingHandler.bind(this)); | ||
} | ||
/** | ||
* Attach zoom keyboard events | ||
*/ | ||
attachKeyboardZoomEvents() { | ||
fabric.util.addListener(document, KEY_DOWN, this._listeners.keydown); | ||
@@ -138,2 +144,10 @@ fabric.util.addListener(document, KEY_UP, this._listeners.keyup); | ||
/** | ||
* Detach zoom keyboard events | ||
*/ | ||
detachKeyboardZoomEvents() { | ||
fabric.util.removeListener(document, KEY_DOWN, this._listeners.keydown); | ||
fabric.util.removeListener(document, KEY_UP, this._listeners.keyup); | ||
} | ||
/** | ||
* Handler when you started editing text | ||
@@ -165,3 +179,2 @@ * @private | ||
if (e.keyCode === keyCodes.SPACE) { | ||
e.preventDefault(); | ||
this.withSpace = true; | ||
@@ -179,3 +192,2 @@ this.startHandMode(); | ||
if (e.keyCode === keyCodes.SPACE) { | ||
e.preventDefault(); | ||
this.withSpace = false; | ||
@@ -182,0 +194,0 @@ this.endHandMode(); |
@@ -165,2 +165,3 @@ /** | ||
this._attachCanvasEvents(); | ||
this._attachZoomEvents(); | ||
} | ||
@@ -177,5 +178,25 @@ | ||
wrapperEl.parentNode.removeChild(wrapperEl); | ||
this._detachZoomEvents(); | ||
} | ||
/** | ||
* Attach zoom events | ||
*/ | ||
_attachZoomEvents() { | ||
const zoom = this.getComponent(components.ZOOM); | ||
zoom.attachKeyboardZoomEvents(); | ||
} | ||
/** | ||
* Detach zoom events | ||
*/ | ||
_detachZoomEvents() { | ||
const zoom = this.getComponent(components.ZOOM); | ||
zoom.detachKeyboardZoomEvents(); | ||
} | ||
/** | ||
* Deactivates all objects on canvas | ||
@@ -182,0 +203,0 @@ * @returns {Graphics} this |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4411394
41554