diff --git a/dist/ueblueprint.js b/dist/ueblueprint.js index bd68457..d6dfd45 100755 --- a/dist/ueblueprint.js +++ b/dist/ueblueprint.js @@ -19,7 +19,7 @@ class Configuration { static gridLineWidth = 1 // pixel static gridSet = 8 static gridSetLineColor = "#161616" - static gridShrinkThreshold = 4 // exceding size factor threshold to cause a shrink event + static gridShrinkThreshold = 4 // exceding size factor threshold to cause a shrink event static gridSize = 16 // pixel static keysSeparator = "+" static linkCurveHeight = 15 // pixel @@ -852,10 +852,6 @@ class PinEntity extends IEntity { return !this.bHidden && this.Direction == "EGPD_Output" } - /** - * - * @returns {Boolean} - */ isLinked() { return this.LinkedTo?.length > 0 ?? false } @@ -956,18 +952,18 @@ class ObjectEntity extends IEntity { super(options); /** @type {ObjectReferenceEntity} */ this.Class; /** @type {String} */ this.Name; - /** @type {Boolean} */ this.bIsPureFunc; - /** @type {VariableReferenceEntity} */ this.VariableReference; - /** @type {FunctionReferenceEntity} */ this.FunctionReference; - /** @type {FunctionReferenceEntity} */ this.EventReference; - /** @type {ObjectReferenceEntity} */ this.TargetType; + /** @type {Boolean?} */ this.bIsPureFunc; + /** @type {VariableReferenceEntity?} */ this.VariableReference; + /** @type {FunctionReferenceEntity?} */ this.FunctionReference; + /** @type {FunctionReferenceEntity?} */ this.EventReference; + /** @type {ObjectReferenceEntity?} */ this.TargetType; /** @type {IntegerEntity} */ this.NodePosX; /** @type {IntegerEntity} */ this.NodePosY; - /** @type {IdentifierEntity} */ this.AdvancedPinDisplay; - /** @type {IdentifierEntity} */ this.EnabledState; + /** @type {IdentifierEntity?} */ this.AdvancedPinDisplay; + /** @type {IdentifierEntity?} */ this.EnabledState; /** @type {GuidEntity} */ this.NodeGuid; - /** @type {IntegerEntity} */ this.ErrorType; - /** @type {String} */ this.ErrorMsg; + /** @type {IntegerEntity?} */ this.ErrorType; + /** @type {String?} */ this.ErrorMsg; /** @type {PinEntity[]} */ this.CustomProperties; } @@ -1089,7 +1085,7 @@ class Grammar { /** * @template T - * @param {new (values: Object) => T} entityType + * @param {new (values: Object) => T} entityType * @returns {Parsimmon.Parser} */ static createMultiAttributeGrammar = (r, entityType) => @@ -2130,7 +2126,7 @@ class IElement extends HTMLElement { /** * @typedef {import("../template/SelectableDraggableTemplate").default} SelectableDraggableTemplate - * @typedef {import("../entity/IEntity").default} IEntity + * @typedef {import("../entity/IEntity").default} IEntity */ /** @@ -2169,7 +2165,7 @@ class ISelectableDraggableElement extends IElement { } /** - * @param {Number[]} value + * @param {Number[]} value */ setLocation(value = [0, 0]) { const d = [value[0] - this.location[0], value[1] - this.location[1]]; @@ -3303,7 +3299,6 @@ class PinElement extends IElement { } /** - * * @param {PinElement} originalPinElement * @param {PinReferenceEntity} newReference */ @@ -3455,7 +3450,7 @@ class NodeTemplate extends SelectableDraggableTemplate {
- ${node.entity.EnabledState.toString() == "DevelopmentOnly" ? html` + ${node.entity.EnabledState?.toString() == "DevelopmentOnly" ? html`
Development Only
` : ""} ${node.entity.AdvancedPinDisplay ? html` @@ -4332,7 +4327,6 @@ class BlueprintTemplate extends ITemplate { } /** - * * @param {Blueprint} blueprint * @param {PinReferenceEntity} pinReference * @returns {PinElement} @@ -4565,7 +4559,7 @@ class Blueprint extends IElement { } /** - * @param {Number} x - Horizontal + * @param {Number} x - Horizontal * @param {Number} y - Vertical expand value (negative means top, positive means bottom) * @param {Number} factor - Either 1 (expand) or -1 (shrink) */ @@ -4681,9 +4675,8 @@ class Blueprint extends IElement { } /** - * @param {PinElement} sourcePin - * @param {PinElement} destinationPin - * @returns + * @param {PinElement} sourcePin + * @param {PinElement} destinationPin */ getLink(sourcePin, destinationPin, ignoreDirection = false) { return this.links.find(link => @@ -4873,7 +4866,7 @@ function initializeSerializerFactory() { ); SerializerFactory.registerSerializer( - PinEntity, + PinEntity, new PinSerializer() ); diff --git a/js/Blueprint.js b/js/Blueprint.js index 695677f..a517916 100755 --- a/js/Blueprint.js +++ b/js/Blueprint.js @@ -227,7 +227,7 @@ export default class Blueprint extends IElement { } /** - * @param {Number} x - Horizontal + * @param {Number} x - Horizontal * @param {Number} y - Vertical expand value (negative means top, positive means bottom) * @param {Number} factor - Either 1 (expand) or -1 (shrink) */ @@ -343,9 +343,8 @@ export default class Blueprint extends IElement { } /** - * @param {PinElement} sourcePin - * @param {PinElement} destinationPin - * @returns + * @param {PinElement} sourcePin + * @param {PinElement} destinationPin */ getLink(sourcePin, destinationPin, ignoreDirection = false) { return this.links.find(link => diff --git a/js/Configuration.js b/js/Configuration.js index 774349e..1cbfd1b 100755 --- a/js/Configuration.js +++ b/js/Configuration.js @@ -19,7 +19,7 @@ export default class Configuration { static gridLineWidth = 1 // pixel static gridSet = 8 static gridSetLineColor = "#161616" - static gridShrinkThreshold = 4 // exceding size factor threshold to cause a shrink event + static gridShrinkThreshold = 4 // exceding size factor threshold to cause a shrink event static gridSize = 16 // pixel static keysSeparator = "+" static linkCurveHeight = 15 // pixel diff --git a/js/element/ISelectableDraggableElement.js b/js/element/ISelectableDraggableElement.js index ed49eb3..90369a2 100644 --- a/js/element/ISelectableDraggableElement.js +++ b/js/element/ISelectableDraggableElement.js @@ -6,7 +6,7 @@ import Utility from "../Utility" /** * @typedef {import("../template/SelectableDraggableTemplate").default} SelectableDraggableTemplate - * @typedef {import("../entity/IEntity").default} IEntity + * @typedef {import("../entity/IEntity").default} IEntity */ /** @@ -45,7 +45,7 @@ export default class ISelectableDraggableElement extends IElement { } /** - * @param {Number[]} value + * @param {Number[]} value */ setLocation(value = [0, 0]) { const d = [value[0] - this.location[0], value[1] - this.location[1]] diff --git a/js/element/PinElement.js b/js/element/PinElement.js index a134e44..634ce00 100644 --- a/js/element/PinElement.js +++ b/js/element/PinElement.js @@ -150,7 +150,6 @@ export default class PinElement extends IElement { } /** - * * @param {PinElement} originalPinElement * @param {PinReferenceEntity} newReference */ diff --git a/js/entity/ObjectEntity.js b/js/entity/ObjectEntity.js index 1919ca9..3fc54bd 100755 --- a/js/entity/ObjectEntity.js +++ b/js/entity/ObjectEntity.js @@ -37,18 +37,18 @@ export default class ObjectEntity extends IEntity { super(options) /** @type {ObjectReferenceEntity} */ this.Class /** @type {String} */ this.Name - /** @type {Boolean} */ this.bIsPureFunc - /** @type {VariableReferenceEntity} */ this.VariableReference - /** @type {FunctionReferenceEntity} */ this.FunctionReference - /** @type {FunctionReferenceEntity} */ this.EventReference - /** @type {ObjectReferenceEntity} */ this.TargetType + /** @type {Boolean?} */ this.bIsPureFunc + /** @type {VariableReferenceEntity?} */ this.VariableReference + /** @type {FunctionReferenceEntity?} */ this.FunctionReference + /** @type {FunctionReferenceEntity?} */ this.EventReference + /** @type {ObjectReferenceEntity?} */ this.TargetType /** @type {IntegerEntity} */ this.NodePosX /** @type {IntegerEntity} */ this.NodePosY - /** @type {IdentifierEntity} */ this.AdvancedPinDisplay - /** @type {IdentifierEntity} */ this.EnabledState + /** @type {IdentifierEntity?} */ this.AdvancedPinDisplay + /** @type {IdentifierEntity?} */ this.EnabledState /** @type {GuidEntity} */ this.NodeGuid - /** @type {IntegerEntity} */ this.ErrorType - /** @type {String} */ this.ErrorMsg + /** @type {IntegerEntity?} */ this.ErrorType + /** @type {String?} */ this.ErrorMsg /** @type {PinEntity[]} */ this.CustomProperties } diff --git a/js/entity/PinEntity.js b/js/entity/PinEntity.js index e7e8feb..16f38e3 100755 --- a/js/entity/PinEntity.js +++ b/js/entity/PinEntity.js @@ -87,10 +87,6 @@ export default class PinEntity extends IEntity { return !this.bHidden && this.Direction == "EGPD_Output" } - /** - * - * @returns {Boolean} - */ isLinked() { return this.LinkedTo?.length > 0 ?? false } diff --git a/js/serialization/Grammar.js b/js/serialization/Grammar.js index 94d1339..335543f 100755 --- a/js/serialization/Grammar.js +++ b/js/serialization/Grammar.js @@ -86,7 +86,7 @@ export default class Grammar { /** * @template T - * @param {new (values: Object) => T} entityType + * @param {new (values: Object) => T} entityType * @returns {Parsimmon.Parser} */ static createMultiAttributeGrammar = (r, entityType) => diff --git a/js/serialization/initializeSerializerFactory.js b/js/serialization/initializeSerializerFactory.js index d14a6b4..ce099ae 100755 --- a/js/serialization/initializeSerializerFactory.js +++ b/js/serialization/initializeSerializerFactory.js @@ -27,7 +27,7 @@ export default function initializeSerializerFactory() { ) SerializerFactory.registerSerializer( - PinEntity, + PinEntity, new PinSerializer() ) diff --git a/js/template/BlueprintTemplate.js b/js/template/BlueprintTemplate.js index fd18912..7031154 100755 --- a/js/template/BlueprintTemplate.js +++ b/js/template/BlueprintTemplate.js @@ -183,7 +183,6 @@ export default class BlueprintTemplate extends ITemplate { } /** - * * @param {Blueprint} blueprint * @param {PinReferenceEntity} pinReference * @returns {PinElement} diff --git a/js/template/NodeTemplate.js b/js/template/NodeTemplate.js index 6b540c9..08fe01f 100755 --- a/js/template/NodeTemplate.js +++ b/js/template/NodeTemplate.js @@ -34,7 +34,7 @@ export default class NodeTemplate extends SelectableDraggableTemplate {
- ${node.entity.EnabledState.toString() == "DevelopmentOnly" ? html` + ${node.entity.EnabledState?.toString() == "DevelopmentOnly" ? html`
Development Only
` : ""} ${node.entity.AdvancedPinDisplay ? html`