mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 08:48:57 +08:00
resizer fixes
This commit is contained in:
parent
310004337d
commit
a9ab965bb0
13
konva.js
13
konva.js
@ -18240,7 +18240,7 @@
|
||||
attachTo: function(node) {
|
||||
this._el = node;
|
||||
this._update();
|
||||
this._el.on('dragmove', this._update);
|
||||
this._el.on('dragmove.resizer', this._update);
|
||||
// this._set();
|
||||
},
|
||||
|
||||
@ -18284,6 +18284,9 @@
|
||||
});
|
||||
anchor.on('mouseout', function() {
|
||||
var layer = this.getLayer();
|
||||
if (!layer) {
|
||||
return;
|
||||
}
|
||||
document.body.style.cursor = 'default';
|
||||
this.setStrokeWidth(1);
|
||||
layer.draw();
|
||||
@ -18553,6 +18556,14 @@
|
||||
x: width / 2,
|
||||
y: -50
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
Konva.Group.prototype.destroy.call(this);
|
||||
this._el.off('.resizer');
|
||||
window.removeEventListener('mousemove', this.handleMouseMove);
|
||||
window.removeEventListener('touchmove', this.handleMouseMove);
|
||||
window.removeEventListener('mouseup', this.handleMouseUp);
|
||||
window.removeEventListener('touchend', this.handleMouseUp);
|
||||
}
|
||||
};
|
||||
Konva.Util.extend(Konva.Resizer, Konva.Group);
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,7 +19,7 @@
|
||||
attachTo: function(node) {
|
||||
this._el = node;
|
||||
this._update();
|
||||
this._el.on('dragmove', this._update);
|
||||
this._el.on('dragmove.resizer', this._update);
|
||||
// this._set();
|
||||
},
|
||||
|
||||
@ -63,6 +63,9 @@
|
||||
});
|
||||
anchor.on('mouseout', function() {
|
||||
var layer = this.getLayer();
|
||||
if (!layer) {
|
||||
return;
|
||||
}
|
||||
document.body.style.cursor = 'default';
|
||||
this.setStrokeWidth(1);
|
||||
layer.draw();
|
||||
@ -332,6 +335,14 @@
|
||||
x: width / 2,
|
||||
y: -50
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
Konva.Group.prototype.destroy.call(this);
|
||||
this._el.off('.resizer');
|
||||
window.removeEventListener('mousemove', this.handleMouseMove);
|
||||
window.removeEventListener('touchmove', this.handleMouseMove);
|
||||
window.removeEventListener('mouseup', this.handleMouseUp);
|
||||
window.removeEventListener('touchend', this.handleMouseUp);
|
||||
}
|
||||
};
|
||||
Konva.Util.extend(Konva.Resizer, Konva.Group);
|
||||
|
Loading…
Reference in New Issue
Block a user