diff --git a/src/DragAndDrop.js b/src/DragAndDrop.js index 80f86c4e..7579a492 100644 --- a/src/DragAndDrop.js +++ b/src/DragAndDrop.js @@ -95,11 +95,14 @@ Kinetic.Node.prototype._setDragPosition = function(evt) { var dd = Kinetic.DD, pos = this.getStage().getPointerPosition(), - dbf = this.getDragBoundFunc(), - newNodePos = { - x: pos.x - dd.offset.x, - y: pos.y - dd.offset.y - }; + dbf = this.getDragBoundFunc(); + if (!pos) { + return; + } + var newNodePos = { + x: pos.x - dd.offset.x, + y: pos.y - dd.offset.y + }; if(dbf !== undefined) { newNodePos = dbf.call(this, newNodePos, evt);