mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-18 20:34:54 +08:00
Edge scroll, minor refactoring
This commit is contained in:
@@ -3,6 +3,7 @@ import ElementFactory from "../../element/ElementFactory"
|
||||
import IMouseClickDrag from "./IMouseClickDrag"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
@@ -68,6 +69,16 @@ export default class MouseCreateLink extends IMouseClickDrag {
|
||||
|
||||
linkValid = false
|
||||
|
||||
/**
|
||||
* @param {PinElement} target
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.scrollGraphEdge ??= true
|
||||
super(target, blueprint, options)
|
||||
}
|
||||
|
||||
startDrag(location) {
|
||||
if (this.target.nodeElement.getType() == Configuration.nodeType.knot) {
|
||||
this.#knotPin = this.target
|
||||
|
||||
Reference in New Issue
Block a user