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

A couple of model questions

$
0
0

@estesbubba wrote:

I'm working on the next version of our product and trying to use ChangedEvents for everything possible instead of a bunch of DiagramEvents. I have a couple of questions.

  1. Is there anyway to have the auto ID generator for new nodes return a string instead of a number? The auto negative number works perfect but we use strings for id and want to make eslint happy using === instead of ==. If not I'm assuming I need to supply a makeUniqueKeyFunction().

  2. After a node is added I need to add/change some of the node model data. The API says if I change nodeDataArray it doesn't notify the model or diagram and I don't see an updateNodeData() method. In the past I've used model.setDataProperty() but I have to call it for each item I want to change. What is the best way to bulk change data for a node/link?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6972

Trending Articles