elk icon indicating copy to clipboard operation
elk copied to clipboard

[Question] Storing custom data properties on ElkNode and ElkEdge objects (to be used later during rendering)?

Open IarwainBen-adar opened this issue 9 months ago • 2 comments

Is there any documentation available on storing custom properties on ElkNode and ElkEdge objects?

From examining the ELK source and metadata descriptions, and from trial and error within the ELK-Live json-to-elkt converter, I have come to the initial conclusion that custom data property attributes are allowed to hang off the base definition of an ElkNode or ElkEdge object, as in:

{
    id: "n1",
    tokenData: {
        category: "node",
    }
}

But if I try to store custom data properties inside the properties block itself, ELK throws errors:

{
    id: "n1",
    properties: {
        tokenData: {
            category: "node",
        }
    }
}

Is the properties block itself a special case for ELK? I can find very little (if any) mention of the properties block in the ELK API documentation.

IarwainBen-adar avatar Mar 12 '25 15:03 IarwainBen-adar