mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 17:21:36 +08:00
(Forgot to build the dist-versions.)
This commit is contained in:
15
dist/kinetic-core.js
vendored
15
dist/kinetic-core.js
vendored
@@ -3,7 +3,7 @@
|
||||
* http://www.kineticjs.com/
|
||||
* Copyright 2012, Eric Rowell
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: Aug 13 2012
|
||||
* Date: Aug 14 2012
|
||||
*
|
||||
* Copyright (C) 2011 - 2012 by Eric Rowell
|
||||
*
|
||||
@@ -3510,8 +3510,8 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
|
||||
if(node) {
|
||||
var pos = that.getUserPosition();
|
||||
var db = node.attrs.dragBounds;
|
||||
var dbf = node.attrs.dragBoundFunc;
|
||||
var db = node.attrs.dragBounds;
|
||||
var dc = node.attrs.dragConstraint;
|
||||
var lastNodePos = {
|
||||
x: node.attrs.x,
|
||||
@@ -3524,6 +3524,11 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
y: pos.y - go.drag.offset.y
|
||||
};
|
||||
|
||||
if(dbf !== undefined) {
|
||||
// execute nodes dragBoundFunc if defined
|
||||
newNodePos = dbf.call(node, newNodePos, evt);
|
||||
}
|
||||
|
||||
// bounds overrides
|
||||
if(db.left !== undefined && newNodePos.x < db.left) {
|
||||
newNodePos.x = db.left;
|
||||
@@ -3538,11 +3543,6 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
newNodePos.y = db.bottom;
|
||||
}
|
||||
|
||||
if(dbf !== undefined) {
|
||||
// execute dragBoundFunc if defined
|
||||
newNodePos = dbf.call(node, newNodePos, evt);
|
||||
}
|
||||
|
||||
// constraint overrides
|
||||
if(dc === 'horizontal') {
|
||||
newNodePos.y = lastNodePos.y;
|
||||
@@ -3551,7 +3551,6 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
newNodePos.x = lastNodePos.x;
|
||||
}
|
||||
|
||||
|
||||
node.setAbsolutePosition(newNodePos);
|
||||
|
||||
if(!go.drag.moving) {
|
||||
|
||||
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user