mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-03 23:55:04 +08:00
Simple serialization entities fixes and tests
This commit is contained in:
@@ -140,6 +140,9 @@ export default class IMouseClickDrag extends IPointing {
|
||||
#trackingMouse = false
|
||||
#movementListenedElement
|
||||
#draggableElement
|
||||
get draggableElement() {
|
||||
return this.#draggableElement
|
||||
}
|
||||
|
||||
clickedOffset = /** @type {Coordinates} */([0, 0])
|
||||
clickedPosition = /** @type {Coordinates} */([0, 0])
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
import MouseMoveDraggable from "./MouseMoveDraggable.js"
|
||||
|
||||
/** @typedef {import("./IMouseClickDrag.js").Options} Options */
|
||||
|
||||
/** @extends {MouseMoveDraggable<NodeElement>} */
|
||||
export default class MouseMoveNodes extends MouseMoveDraggable {
|
||||
|
||||
/**
|
||||
* @param {NodeElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Options} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
super(target, blueprint, options)
|
||||
this.draggableElement.classList.add("ueb-draggable")
|
||||
}
|
||||
|
||||
startDrag() {
|
||||
if (!this.target.selected) {
|
||||
this.blueprint.unselectAll()
|
||||
|
||||
Reference in New Issue
Block a user