Several fixes for the attribute order

This commit is contained in:
barsdeveloper
2024-03-29 23:59:57 +01:00
parent c14212b230
commit acedafc339
16 changed files with 321 additions and 334 deletions

View File

@@ -1,4 +1,5 @@
import Configuration from "../Configuration.js"
import AttributeInfo from "../entity/AttributeInfo.js"
import ObjectEntity from "../entity/ObjectEntity.js"
import PinEntity from "../entity/PinEntity.js"
import Grammar from "./Grammar.js"
@@ -88,13 +89,15 @@ export default class ObjectSerializer extends Serializer {
attributeValueConjunctionSign,
key => entity[key] instanceof ObjectEntity ? "" : attributeKeyPrinter(key)
)
+ entity.getCustomproperties().map(pin =>
moreIndentation
+ attributeKeyPrinter("CustomProperties ")
+ SerializerFactory.getSerializer(PinEntity).doWrite(pin, insideString)
+ this.attributeSeparator
+ (!AttributeInfo.getAttribute(entity, "CustomProperties", "ignored")
? entity.getCustomproperties().map(pin =>
moreIndentation
+ attributeKeyPrinter("CustomProperties ")
+ SerializerFactory.getSerializer(PinEntity).doWrite(pin, insideString)
+ this.attributeSeparator
).join("")
: ""
)
.join("")
+ indentation + "End Object"
return result
}