ID Generation for Nodes, Links, and Ports #2770
Unanswered
Qbijayapdl07
asked this question in
Q&A
Replies: 1 comment
-
You can override the dia.Element.define('MyShape', {
// element attributes
}, {
// element prototype
generateId() {
return TSID.Factory.getTsid().toLong();
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
"When creating nodes, links, or ports in JointJS, the library automatically generates a UUID as the ID for each element. Is it possible to generate the ID in TSID format instead?"
Steps to reproduce
No response
Restrictions & Constraints
No response
Does your question relate to JointJS or JointJS+. Select both if applicable.
JointJS
Beta Was this translation helpful? Give feedback.
All reactions