This commit is contained in:
Лаврёнов Антон 2014-02-28 00:07:29 +08:00
parent f9a05c4a56
commit faa3ef13cd

View File

@ -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);