mirror of
https://github.com/konvajs/konva.git
synced 2025-04-29 19:31:51 +08:00
fixed edge case with new drag and drop bounds
This commit is contained in:
parent
f312c0cf9d
commit
e61f100b10
6
dist/kinetic-core.js
vendored
6
dist/kinetic-core.js
vendored
@ -1583,13 +1583,13 @@ Kinetic.Stage.prototype = {
|
||||
if(db.left !== undefined && newNodePos.x < db.left) {
|
||||
newNodePos.x = db.left;
|
||||
}
|
||||
else if(db.right !== undefined && newNodePos.x > db.right) {
|
||||
if(db.right !== undefined && newNodePos.x > db.right) {
|
||||
newNodePos.x = db.right;
|
||||
}
|
||||
else if(db.top !== undefined && newNodePos.y < db.top) {
|
||||
if(db.top !== undefined && newNodePos.y < db.top) {
|
||||
newNodePos.y = db.top;
|
||||
}
|
||||
else if(db.bottom !== undefined && newNodePos.y > db.bottom) {
|
||||
if(db.bottom !== undefined && newNodePos.y > db.bottom) {
|
||||
newNodePos.y = db.bottom;
|
||||
}
|
||||
|
||||
|
2
dist/kinetic-core.min.js
vendored
2
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -606,13 +606,13 @@ Kinetic.Stage.prototype = {
|
||||
if(db.left !== undefined && newNodePos.x < db.left) {
|
||||
newNodePos.x = db.left;
|
||||
}
|
||||
else if(db.right !== undefined && newNodePos.x > db.right) {
|
||||
if(db.right !== undefined && newNodePos.x > db.right) {
|
||||
newNodePos.x = db.right;
|
||||
}
|
||||
else if(db.top !== undefined && newNodePos.y < db.top) {
|
||||
if(db.top !== undefined && newNodePos.y < db.top) {
|
||||
newNodePos.y = db.top;
|
||||
}
|
||||
else if(db.bottom !== undefined && newNodePos.y > db.bottom) {
|
||||
if(db.bottom !== undefined && newNodePos.y > db.bottom) {
|
||||
newNodePos.y = db.bottom;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user