mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-19 04:55:57 +08:00
Small fixes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import GraphElement from "./GraphElement"
|
||||
import LinkTemplate from "../template/LinkTemplate"
|
||||
import GraphPin from "./GraphPin"
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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