mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-22 14:17:30 +08:00
Fix pins retrieval
This commit is contained in:
@@ -4,7 +4,10 @@ import ITemplate from "./ITemplate"
|
||||
import sanitizeText from "./sanitizeText"
|
||||
import SelectorElement from "../element/SelectorElement"
|
||||
|
||||
/** @typedef {import("../Blueprint").default} Blueprint */
|
||||
/**
|
||||
* @typedef {import("../Blueprint").default} Blueprint
|
||||
* @typedef {import("../entity/PinReferenceEntity").default} PinReferenceEntity
|
||||
*/
|
||||
export default class BlueprintTemplate extends ITemplate {
|
||||
header(element) {
|
||||
return html`
|
||||
@@ -123,4 +126,16 @@ export default class BlueprintTemplate extends ITemplate {
|
||||
applyEndDragScrolling(blueprint) {
|
||||
blueprint.dataset.dragScrolling = false
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {PinReferenceEntity} pinReference
|
||||
* @returns
|
||||
*/
|
||||
getPin(blueprint, pinReference) {
|
||||
return blueprint.querySelector(
|
||||
`ueb-node[data-name="${pinReference.objectName}"] ueb-pin[data-id="${pinReference.pinGuid}"]`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user