Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6969

Uniqueness of __gohashid

$
0
0

@extrilldi wrote:

Hello

I'm developing a project based on GoJS, and planning to save links 'references' in a in-memory structure where I would do some CRUD operations, on the data associated with said links.
For this I would need to use some unique id, could I rely on the __gohashid property that is created for each gojs component? is this id unique?

Later, I'll implement a diagram cloning feature, managing multiple gojs model diagrams with slightly modifications done by the user (more nodes, different associated data, etc).
I'm not sure if I'll have conflicts while managing gohashid values across different gojs model diagrams. I think about diagrams having different ids themselves, but the nodes and links should be shared across original and cloned diagrams.
Maybe could I use a composite id using diagram.model.___gohashid and link.__gohashid?
Or is it better to roll a custom ID property on diagram, nodes and links myself?

Thanks for your attention.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles