mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-18 12:24:51 +08:00
Small fixes
This commit is contained in:
@@ -61,4 +61,11 @@ export default class SelectableDraggable extends GraphElement {
|
||||
})
|
||||
this.blueprint.dispatchEvent(dragEvent)
|
||||
}
|
||||
|
||||
snapToGrid() {
|
||||
let snappedLocation = this.blueprint.snapToGrid(this.location)
|
||||
if (this.location[0] != snappedLocation[0] || this.location[1] != snappedLocation[1]) {
|
||||
this.setLocation(snappedLocation)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user