mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-16 10:54:42 +08:00
Small refactoring
This commit is contained in:
@@ -17,8 +17,8 @@ export default class Pointing extends Context {
|
||||
const scaleCorrection = 1 / Utility.getScale(this.target)
|
||||
const targetOffset = this.movementSpace.getBoundingClientRect()
|
||||
let location = [
|
||||
(mouseEvent.clientX - targetOffset.x) * scaleCorrection,
|
||||
(mouseEvent.clientY - targetOffset.y) * scaleCorrection
|
||||
Math.round((mouseEvent.clientX - targetOffset.x) * scaleCorrection),
|
||||
Math.round((mouseEvent.clientY - targetOffset.y) * scaleCorrection)
|
||||
]
|
||||
return location
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class Unfocus extends Context {
|
||||
*/
|
||||
clickedSomewhere(e) {
|
||||
// If target is inside the blueprint grid
|
||||
if (e.target.closest("u-blueprint")) {
|
||||
if (e.target.closest("ueb-blueprint")) {
|
||||
return
|
||||
}
|
||||
this.blueprint.setFocused(false)
|
||||
|
||||
Reference in New Issue
Block a user