mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
restore 'empty' drag algorithm
This commit is contained in:
parent
3f0e89cd95
commit
d82ec329e9
@ -27,7 +27,6 @@
|
|||||||
Math.abs(pos.x - dd.startPointerPos.x),
|
Math.abs(pos.x - dd.startPointerPos.x),
|
||||||
Math.abs(pos.y - dd.startPointerPos.y)
|
Math.abs(pos.y - dd.startPointerPos.y)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (distance < dragDistance) {
|
if (distance < dragDistance) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -138,11 +137,10 @@
|
|||||||
if(dbf !== undefined) {
|
if(dbf !== undefined) {
|
||||||
newNodePos = dbf.call(this, newNodePos, evt);
|
newNodePos = dbf.call(this, newNodePos, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setAbsolutePosition(newNodePos);
|
this.setAbsolutePosition(newNodePos);
|
||||||
|
|
||||||
if (this._lastPos && this._lastPos.x === newNodePos.x &&
|
if (!this._lastPos || this._lastPos.x !== newNodePos.x ||
|
||||||
this._lastPos.y === newNodePos.y) {
|
this._lastPos.y !== newNodePos.y) {
|
||||||
dd.anim.dirty = true;
|
dd.anim.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,6 +235,10 @@ var Kinetic = {};
|
|||||||
* @param {Object} config
|
* @param {Object} config
|
||||||
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
* @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
|
||||||
* to clear the canvas before each layer draw. The default value is true.
|
* to clear the canvas before each layer draw. The default value is true.
|
||||||
|
* @param {Boolean} [config.visible]
|
||||||
|
* @param {String} [config.id] unique id
|
||||||
|
* @param {String} [config.name] non-unique name
|
||||||
|
* @param {Number} [config.opacity] determines node opacity. Can be any number between 0 and 1
|
||||||
* @@containerParams
|
* @@containerParams
|
||||||
* @example
|
* @example
|
||||||
* var layer = new Kinetic.FastLayer();
|
* var layer = new Kinetic.FastLayer();
|
||||||
|
Loading…
Reference in New Issue
Block a user