mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-04 14:27:29 +08:00
Color picker refactoring
This commit is contained in:
@@ -18,6 +18,7 @@ export default class MouseMoveDraggable extends IMouseClickDrag {
|
||||
? Utility.snapToGrid(location, this.stepSize)
|
||||
: location
|
||||
)
|
||||
this.clickedOffset = [0, 0]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +43,9 @@ export default class MouseMoveDraggable extends IMouseClickDrag {
|
||||
}
|
||||
|
||||
dragAction(location, offset) {
|
||||
this.target.addLocation(offset)
|
||||
this.target.setLocation([
|
||||
location[0] - this.clickedOffset[0],
|
||||
location[1] - this.clickedOffset[1]
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user