mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 23:37:30 +08:00
Indexed array entity, user defined pins
This commit is contained in:
17
js/entity/IndexedArray.js
Normal file
17
js/entity/IndexedArray.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/** @typedef {import("./IEntity").AnyValueConstructor<*>} AnyValueConstructor */
|
||||
|
||||
export default class IndexedArray {
|
||||
|
||||
#type
|
||||
get type() {
|
||||
return this.#type
|
||||
}
|
||||
|
||||
value = []
|
||||
|
||||
/** @param {AnyValueConstructor} type */
|
||||
constructor(type, value = []) {
|
||||
this.#type = type
|
||||
this.value = value
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import ObjectReferenceEntity from "./ObjectReferenceEntity.js"
|
||||
import PinEntity from "./PinEntity.js"
|
||||
import SVGIcon from "../SVGIcon.js"
|
||||
import SymbolEntity from "./SymbolEntity.js"
|
||||
import UnionType from "./UnionType.js"
|
||||
import UserDefinedPinEntity from "./UserDefinedPinEntity.js"
|
||||
import Utility from "../Utility.js"
|
||||
import VariableReferenceEntity from "./VariableReferenceEntity.js"
|
||||
|
||||
@@ -196,7 +198,7 @@ export default class ObjectEntity extends IEntity {
|
||||
showDefault: false,
|
||||
},
|
||||
CustomProperties: {
|
||||
type: [PinEntity]
|
||||
type: [new UnionType(PinEntity, UserDefinedPinEntity)]
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
9
js/entity/UserDefinedPinEntity.js
Executable file
9
js/entity/UserDefinedPinEntity.js
Executable file
@@ -0,0 +1,9 @@
|
||||
import IEntity from "./IEntity.js"
|
||||
import PinEntity from "./PinEntity.js"
|
||||
|
||||
/** @typedef {import("./IEntity.js").AnyValue} AnyValue */
|
||||
|
||||
export default class UserDefinedPinEntity extends IEntity {
|
||||
|
||||
static lookbehind = "UserDefinedPin"
|
||||
}
|
||||
Reference in New Issue
Block a user