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

User textblock edit with cascading consequences

$
0
0

@felix wrote:

Hello,

after the user has edited a textblock in a given node, my application has to immediately propagate changes to the data of all descendent nodes. (No cycles allowed in the diagram, so this is a one-way flow without possible loops.)

What's the correct event hook/textblock property to latch onto? Is there an example of this?

I looked through the changedEvents documentation, but I couldn't figure out the proper way of doing this. The documentation furthermore says that the event listeners should not make further changes to the model data, but this is precisely what I need to do (preferably within the same transaction). Also, changing the textblock doesn't seem to fire the listener I tried to add via addModelChangedListener or addChangedListener.

I also thought about using the textValidation function of the textblock, but it seems unclean to cause side-effects in this way -- and seems to break the TextBlock editing, anyway.

Analogously to the click property of a node or the textValidate property of the textblock, is there an onEdit property for the textblock which allows me to directly add a listening function, given that a change has been successfully made, allowing me to make other changes in the diagram before the transaction is committed?

Many thanks
F

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles