mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-04-28 05:17:32 +08:00
Small fix
This commit is contained in:
@@ -67,7 +67,7 @@ const tests = [
|
||||
const pinObjects = Object.keys(entity)
|
||||
.filter(k => k.startsWith(Configuration.subObjectAttributeNamePrefix))
|
||||
.map(k => /** @type {import("../../js/entity/ObjectEntity.js").default} */(entity[k]))
|
||||
.filter(v => v.getType())
|
||||
.filter(v => v.Class)
|
||||
expect(pinObjects).to.be.of.length(4)
|
||||
pinObjects.forEach(v => expect(v.getType()).to.be.equal(Configuration.paths.edGraphPinDeprecated))
|
||||
expect(entity.getPinEntities()).to.be.of.length(4)
|
||||
|
||||
10
dist/ueblueprint.js
vendored
10
dist/ueblueprint.js
vendored
@@ -237,7 +237,7 @@ class Configuration {
|
||||
static subObjectAttributeNamePrefix = "#SubObject"
|
||||
/** @param {ObjectEntity} objectEntity */
|
||||
static subObjectAttributeNameFromEntity = (objectEntity, nameOnly = false) =>
|
||||
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class?.path ? `_${objectEntity.Class.path}` : "")
|
||||
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class ? `_${objectEntity.Class}` : "")
|
||||
+ `_${objectEntity.Name}`
|
||||
/** @param {ObjectReferenceEntity} objectReferenceEntity */
|
||||
static subObjectAttributeNameFromReference = (objectReferenceEntity, nameOnly = false) =>
|
||||
@@ -1606,6 +1606,10 @@ class ObjectReferenceEntity extends IEntity {
|
||||
getName() {
|
||||
return Utility.getNameFromPath(this.path)
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `${this.type}'"${this.path}"'`
|
||||
}
|
||||
}
|
||||
|
||||
class FunctionReferenceEntity extends IEntity {
|
||||
@@ -4220,8 +4224,8 @@ class Grammar {
|
||||
P.alt(
|
||||
this.noneReferenceEntity,
|
||||
this.fullReferenceEntity,
|
||||
this.pathReferenceEntity,
|
||||
this.typeReferenceEntity,
|
||||
this.pathReferenceEntity,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7831,7 +7835,7 @@ class PinTemplate extends ITemplate {
|
||||
}
|
||||
|
||||
renderIcon() {
|
||||
switch (this.element.entity.PinType.ContainerType.toString()) {
|
||||
switch (this.element.entity.PinType.ContainerType?.toString()) {
|
||||
case "Array": return SVGIcon.array
|
||||
case "Set": return SVGIcon.set
|
||||
case "Map": return SVGIcon.map
|
||||
|
||||
2
dist/ueblueprint.min.js
vendored
2
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -213,7 +213,7 @@ export default class Configuration {
|
||||
static subObjectAttributeNamePrefix = "#SubObject"
|
||||
/** @param {ObjectEntity} objectEntity */
|
||||
static subObjectAttributeNameFromEntity = (objectEntity, nameOnly = false) =>
|
||||
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class?.path ? `_${objectEntity.Class.path}` : "")
|
||||
this.subObjectAttributeNamePrefix + (!nameOnly && objectEntity.Class ? `_${objectEntity.Class}` : "")
|
||||
+ `_${objectEntity.Name}`
|
||||
/** @param {ObjectReferenceEntity} objectReferenceEntity */
|
||||
static subObjectAttributeNameFromReference = (objectReferenceEntity, nameOnly = false) =>
|
||||
|
||||
@@ -49,4 +49,8 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
getName() {
|
||||
return Utility.getNameFromPath(this.path)
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `${this.type}'"${this.path}"'`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,8 +492,8 @@ export default class Grammar {
|
||||
P.alt(
|
||||
this.noneReferenceEntity,
|
||||
this.fullReferenceEntity,
|
||||
this.pathReferenceEntity,
|
||||
this.typeReferenceEntity,
|
||||
this.pathReferenceEntity,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ export default class PinTemplate extends ITemplate {
|
||||
}
|
||||
|
||||
renderIcon() {
|
||||
switch (this.element.entity.PinType.ContainerType.toString()) {
|
||||
switch (this.element.entity.PinType.ContainerType?.toString()) {
|
||||
case "Array": return SVGIcon.array
|
||||
case "Set": return SVGIcon.set
|
||||
case "Map": return SVGIcon.map
|
||||
|
||||
Reference in New Issue
Block a user