mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
fix #431
This commit is contained in:
@@ -95,8 +95,11 @@
|
|||||||
Kinetic.Node.prototype._setDragPosition = function(evt) {
|
Kinetic.Node.prototype._setDragPosition = function(evt) {
|
||||||
var dd = Kinetic.DD,
|
var dd = Kinetic.DD,
|
||||||
pos = this.getStage().getPointerPosition(),
|
pos = this.getStage().getPointerPosition(),
|
||||||
dbf = this.getDragBoundFunc(),
|
dbf = this.getDragBoundFunc();
|
||||||
newNodePos = {
|
if (!pos) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var newNodePos = {
|
||||||
x: pos.x - dd.offset.x,
|
x: pos.x - dd.offset.x,
|
||||||
y: pos.y - dd.offset.y
|
y: pos.y - dd.offset.y
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user