Details fixed

This commit is contained in:
barsdeveloper
2023-04-01 15:44:03 +02:00
parent 82bb9917fb
commit 9d6b498709
7 changed files with 25 additions and 28 deletions

View File

@@ -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,

View File

@@ -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)

View File

@@ -3,10 +3,10 @@ import IEntity from "./IEntity.js"
export default class UnknownKeysEntity extends IEntity {
static attributes = {
lookbehind:
{
lookbehind: {
value: "",
showDefault: false,
ignore: true,
},
}