mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fixed edge case with new drag and drop bounds
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user