mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-24 07:44:42 +08:00
Object reference moved to entity
This commit is contained in:
12
js/export.js
12
js/export.js
@@ -9,6 +9,8 @@ import Blueprint from "./Blueprint"
|
||||
import GraphNode from "./graph/GraphNode"
|
||||
import GraphLink from "./graph/GraphLink"
|
||||
import PinReferenceEntity from "./entity/PinReferenceEntity"
|
||||
import ObjectReferenceEntity from "./entity/ObjectReferenceEntity"
|
||||
import CustomSerializer from "./serialization/CustomSerializer"
|
||||
|
||||
SerializerFactory.registerSerializer(
|
||||
ObjectEntity,
|
||||
@@ -30,5 +32,15 @@ SerializerFactory.registerSerializer(
|
||||
PinReferenceEntity,
|
||||
new GeneralSerializer(v => v, PinReferenceEntity, "", " ", false, "", _ => "")
|
||||
)
|
||||
SerializerFactory.registerSerializer(
|
||||
ObjectReferenceEntity,
|
||||
new CustomSerializer(
|
||||
/** @param {ObjectReferenceEntity} objectReference */
|
||||
objectReference => (objectReference.type ?? "") + (
|
||||
objectReference.path
|
||||
? objectReference.type ? `'"${objectReference.path}"'` : objectReference.path
|
||||
: ""
|
||||
))
|
||||
)
|
||||
|
||||
export { Blueprint as Blueprint, GraphNode as GraphNode, GraphLink as GraphLink }
|
||||
Reference in New Issue
Block a user