mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-20 05:24:52 +08:00
Create knot on link double click
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import ElementFactory from "../../element/ElementFactory"
|
||||
import IInput from "../IInput"
|
||||
import NodeElement from "../../element/NodeElement"
|
||||
import ObjectSerializer from "../../serialization/ObjectSerializer"
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
|
||||
export default class Paste extends IInput {
|
||||
|
||||
static #serializer = new ObjectSerializer()
|
||||
@@ -30,7 +32,9 @@ export default class Paste extends IInput {
|
||||
let left = 0
|
||||
let count = 0
|
||||
let nodes = Paste.#serializer.readMultiple(value).map(entity => {
|
||||
let node = new NodeElement(entity)
|
||||
/** @type {NodeElement} */
|
||||
// @ts-expect-error
|
||||
let node = new (ElementFactory.getConstructor("ueb-node"))(entity)
|
||||
top += node.locationY
|
||||
left += node.locationX
|
||||
++count
|
||||
|
||||
Reference in New Issue
Block a user