mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 09:17:25 +08:00
fix transformer
This commit is contained in:
parent
7b2eccab5c
commit
3de52cac83
12
konva.js
12
konva.js
@ -2,7 +2,7 @@
|
||||
* Konva JavaScript Framework v1.7.6
|
||||
* http://konvajs.github.io/
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: Wed Jan 10 2018
|
||||
* Date: Fri Jan 12 2018
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - 2017 by Anton Lavrenov (Konva)
|
||||
@ -18273,6 +18273,7 @@
|
||||
this._createElements();
|
||||
this.handleMouseMove = this.handleMouseMove.bind(this);
|
||||
this.handleMouseUp = this.handleMouseUp.bind(this);
|
||||
this._update = this._update.bind(this);
|
||||
|
||||
// update transformer data for certain attr changes
|
||||
for (var n = 0; n < ATTR_CHANGE_LIST.length; n++) {
|
||||
@ -18281,10 +18282,17 @@
|
||||
},
|
||||
|
||||
attachTo: function(node) {
|
||||
if (this._el) {
|
||||
this.detach();
|
||||
}
|
||||
this._el = node;
|
||||
this._update();
|
||||
this._el.on('dragmove.resizer', this._update);
|
||||
// this._set();
|
||||
},
|
||||
|
||||
detach: function() {
|
||||
this._el.off('.resizer');
|
||||
this._el = null;
|
||||
},
|
||||
|
||||
_createElements: function() {
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -17,6 +17,7 @@
|
||||
this._createElements();
|
||||
this.handleMouseMove = this.handleMouseMove.bind(this);
|
||||
this.handleMouseUp = this.handleMouseUp.bind(this);
|
||||
this._update = this._update.bind(this);
|
||||
|
||||
// update transformer data for certain attr changes
|
||||
for (var n = 0; n < ATTR_CHANGE_LIST.length; n++) {
|
||||
@ -25,10 +26,17 @@
|
||||
},
|
||||
|
||||
attachTo: function(node) {
|
||||
if (this._el) {
|
||||
this.detach();
|
||||
}
|
||||
this._el = node;
|
||||
this._update();
|
||||
this._el.on('dragmove.resizer', this._update);
|
||||
// this._set();
|
||||
},
|
||||
|
||||
detach: function() {
|
||||
this._el.off('.resizer');
|
||||
this._el = null;
|
||||
},
|
||||
|
||||
_createElements: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user