mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
Details fixed
This commit is contained in:
23
dist/ueblueprint.js
vendored
23
dist/ueblueprint.js
vendored
@@ -878,7 +878,6 @@ class Utility {
|
||||
|
||||
/**
|
||||
* @typedef {(entity: IEntity) => AnyValue} ValueSupplier
|
||||
* @typedef {(entity: IEntity) => AnyValueConstructor<AnyValue>} TypeSupplier
|
||||
* @typedef {IEntity | String | Number | BigInt | Boolean} AnySimpleValue
|
||||
* @typedef {AnySimpleValue | AnySimpleValue[]} AnyValue
|
||||
* @typedef {{
|
||||
@@ -886,7 +885,7 @@ class Utility {
|
||||
* }} AttributeDeclarations
|
||||
* @typedef {typeof IEntity} EntityConstructor
|
||||
* @typedef {{
|
||||
* type?: AnyValueConstructor<AnyValue> | AnyValueConstructor<AnyValue>[] | UnionType | TypeSupplier,
|
||||
* type?: AnyValueConstructor<AnyValue> | AnyValueConstructor<AnyValue>[] | UnionType | ComputedType,
|
||||
* value?: AnyValue | ValueSupplier,
|
||||
* showDefault?: Boolean,
|
||||
* nullable?: Boolean,
|
||||
@@ -2138,12 +2137,12 @@ class PinEntity extends IEntity {
|
||||
linkTo(targetObjectName, targetPinEntity) {
|
||||
const linkFound = this.LinkedTo?.some(pinReferenceEntity =>
|
||||
pinReferenceEntity.objectName.toString() == targetObjectName
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity["PinId"].valueOf()
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity.PinId.valueOf()
|
||||
);
|
||||
if (!linkFound) {
|
||||
(this.LinkedTo ??= []).push(new PinReferenceEntity({
|
||||
objectName: targetObjectName,
|
||||
pinGuid: targetPinEntity["PinId"],
|
||||
pinGuid: targetPinEntity.PinId,
|
||||
}));
|
||||
return true
|
||||
}
|
||||
@@ -2157,7 +2156,7 @@ class PinEntity extends IEntity {
|
||||
unlinkFrom(targetObjectName, targetPinEntity) {
|
||||
const indexElement = this.LinkedTo?.findIndex(pinReferenceEntity => {
|
||||
return pinReferenceEntity.objectName.toString() == targetObjectName
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity["PinId"].valueOf()
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity.PinId.valueOf()
|
||||
});
|
||||
if (indexElement >= 0) {
|
||||
this.LinkedTo.splice(indexElement, 1);
|
||||
@@ -7435,7 +7434,7 @@ class NodeElement extends ISelectableDraggableElement {
|
||||
for (let targetPinReference of sourcePinElement.getLinks()) {
|
||||
this.blueprint.getPin(targetPinReference).redirectLink(sourcePinElement, new PinReferenceEntity({
|
||||
objectName: name,
|
||||
pinGuid: sourcePinElement.entity["PinId"],
|
||||
pinGuid: sourcePinElement.entity.PinId,
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -9265,9 +9264,9 @@ class PinElement extends IElement {
|
||||
nodeElement = undefined
|
||||
) {
|
||||
super.initialize(entity, template);
|
||||
this.pinId = this.entity["PinId"];
|
||||
this.pinId = this.entity.PinId;
|
||||
this.pinType = this.entity.getType();
|
||||
this.advancedView = this.entity["bAdvancedView"];
|
||||
this.advancedView = this.entity.bAdvancedView;
|
||||
this.defaultValue = this.entity.getDefaultValue();
|
||||
this.color = PinElement.properties.color.converter.fromAttribute(this.getColor().toString());
|
||||
this.isLinked = false;
|
||||
@@ -9289,12 +9288,12 @@ class PinElement extends IElement {
|
||||
|
||||
/** @return {GuidEntity} */
|
||||
getPinId() {
|
||||
return this.entity["PinId"]
|
||||
return this.entity.PinId
|
||||
}
|
||||
|
||||
/** @returns {String} */
|
||||
getPinName() {
|
||||
return this.entity["PinName"]
|
||||
return this.entity.PinName
|
||||
}
|
||||
|
||||
getPinDisplayName() {
|
||||
@@ -9332,7 +9331,7 @@ class PinElement extends IElement {
|
||||
|
||||
/** @param {T} value */
|
||||
setDefaultValue(value) {
|
||||
this.entity["DefaultValue"] = value;
|
||||
this.entity.DefaultValue = value;
|
||||
this.defaultValue = value;
|
||||
}
|
||||
|
||||
@@ -9398,7 +9397,7 @@ class PinElement extends IElement {
|
||||
redirectLink(originalPinElement, newReference) {
|
||||
const index = this.getLinks().findIndex(pinReference =>
|
||||
pinReference.objectName.toString() == originalPinElement.getNodeElement().getNodeName()
|
||||
&& pinReference.pinGuid.valueOf() == originalPinElement.entity["PinId"].valueOf()
|
||||
&& pinReference.pinGuid.valueOf() == originalPinElement.entity.PinId.valueOf()
|
||||
);
|
||||
if (index >= 0) {
|
||||
this.entity.LinkedTo[index] = newReference;
|
||||
|
||||
@@ -265,7 +265,7 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
for (let targetPinReference of sourcePinElement.getLinks()) {
|
||||
this.blueprint.getPin(targetPinReference).redirectLink(sourcePinElement, new PinReferenceEntity({
|
||||
objectName: name,
|
||||
pinGuid: sourcePinElement.entity["PinId"],
|
||||
pinGuid: sourcePinElement.entity.PinId,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ export default class PinElement extends IElement {
|
||||
nodeElement = undefined
|
||||
) {
|
||||
super.initialize(entity, template)
|
||||
this.pinId = this.entity["PinId"]
|
||||
this.pinId = this.entity.PinId
|
||||
this.pinType = this.entity.getType()
|
||||
this.advancedView = this.entity["bAdvancedView"]
|
||||
this.advancedView = this.entity.bAdvancedView
|
||||
this.defaultValue = this.entity.getDefaultValue()
|
||||
this.color = PinElement.properties.color.converter.fromAttribute(this.getColor().toString())
|
||||
this.isLinked = false
|
||||
@@ -160,12 +160,12 @@ export default class PinElement extends IElement {
|
||||
|
||||
/** @return {GuidEntity} */
|
||||
getPinId() {
|
||||
return this.entity["PinId"]
|
||||
return this.entity.PinId
|
||||
}
|
||||
|
||||
/** @returns {String} */
|
||||
getPinName() {
|
||||
return this.entity["PinName"]
|
||||
return this.entity.PinName
|
||||
}
|
||||
|
||||
getPinDisplayName() {
|
||||
@@ -203,7 +203,7 @@ export default class PinElement extends IElement {
|
||||
|
||||
/** @param {T} value */
|
||||
setDefaultValue(value) {
|
||||
this.entity["DefaultValue"] = value
|
||||
this.entity.DefaultValue = value
|
||||
this.defaultValue = value
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ export default class PinElement extends IElement {
|
||||
redirectLink(originalPinElement, newReference) {
|
||||
const index = this.getLinks().findIndex(pinReference =>
|
||||
pinReference.objectName.toString() == originalPinElement.getNodeElement().getNodeName()
|
||||
&& pinReference.pinGuid.valueOf() == originalPinElement.entity["PinId"].valueOf()
|
||||
&& pinReference.pinGuid.valueOf() == originalPinElement.entity.PinId.valueOf()
|
||||
)
|
||||
if (index >= 0) {
|
||||
this.entity.LinkedTo[index] = newReference
|
||||
|
||||
@@ -5,7 +5,6 @@ import Utility from "../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {(entity: IEntity) => AnyValue} ValueSupplier
|
||||
* @typedef {(entity: IEntity) => AnyValueConstructor<AnyValue>} TypeSupplier
|
||||
* @typedef {IEntity | String | Number | BigInt | Boolean} AnySimpleValue
|
||||
* @typedef {AnySimpleValue | AnySimpleValue[]} AnyValue
|
||||
* @typedef {{
|
||||
@@ -13,7 +12,7 @@ import Utility from "../Utility.js"
|
||||
* }} AttributeDeclarations
|
||||
* @typedef {typeof IEntity} EntityConstructor
|
||||
* @typedef {{
|
||||
* type?: AnyValueConstructor<AnyValue> | AnyValueConstructor<AnyValue>[] | UnionType | TypeSupplier,
|
||||
* type?: AnyValueConstructor<AnyValue> | AnyValueConstructor<AnyValue>[] | UnionType | ComputedType,
|
||||
* value?: AnyValue | ValueSupplier,
|
||||
* showDefault?: Boolean,
|
||||
* nullable?: Boolean,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import ByteEntity from "./ByteEntity.js"
|
||||
import ComputedType from "./ComputedType.js"
|
||||
import Configuration from "../Configuration.js"
|
||||
import EnumEntity from "./EnumEntity.js"
|
||||
import FormatTextEntity from "./FormatTextEntity.js"
|
||||
@@ -21,7 +22,6 @@ import UnionType from "./UnionType.js"
|
||||
import Utility from "../Utility.js"
|
||||
import Vector2DEntity from "./Vector2DEntity.js"
|
||||
import VectorEntity from "./VectorEntity.js"
|
||||
import ComputedType from "./ComputedType.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./IEntity").AnyValue} AnyValue
|
||||
@@ -242,12 +242,12 @@ export default class PinEntity extends IEntity {
|
||||
linkTo(targetObjectName, targetPinEntity) {
|
||||
const linkFound = this.LinkedTo?.some(pinReferenceEntity =>
|
||||
pinReferenceEntity.objectName.toString() == targetObjectName
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity["PinId"].valueOf()
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity.PinId.valueOf()
|
||||
)
|
||||
if (!linkFound) {
|
||||
(this.LinkedTo ??= []).push(new PinReferenceEntity({
|
||||
objectName: targetObjectName,
|
||||
pinGuid: targetPinEntity["PinId"],
|
||||
pinGuid: targetPinEntity.PinId,
|
||||
}))
|
||||
return true
|
||||
}
|
||||
@@ -261,7 +261,7 @@ export default class PinEntity extends IEntity {
|
||||
unlinkFrom(targetObjectName, targetPinEntity) {
|
||||
const indexElement = this.LinkedTo?.findIndex(pinReferenceEntity => {
|
||||
return pinReferenceEntity.objectName.toString() == targetObjectName
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity["PinId"].valueOf()
|
||||
&& pinReferenceEntity.pinGuid.valueOf() == targetPinEntity.PinId.valueOf()
|
||||
})
|
||||
if (indexElement >= 0) {
|
||||
this.LinkedTo.splice(indexElement, 1)
|
||||
|
||||
@@ -3,10 +3,10 @@ import IEntity from "./IEntity.js"
|
||||
export default class UnknownKeysEntity extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
lookbehind:
|
||||
{
|
||||
lookbehind: {
|
||||
value: "",
|
||||
showDefault: false,
|
||||
ignore: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import SerializerFactory from "./SerializerFactory.js"
|
||||
import Utility from "../Utility.js"
|
||||
import IEntity from "../entity/IEntity.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").EntityConstructor} EntityConstructor
|
||||
|
||||
Reference in New Issue
Block a user