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

Undo seems to fire a LOT of ChangedEvents?

$
0
0

@kdeighton wrote:

I'm trying to observe the changes made in an Undo action but it seems like a lot of unexpected events are fired when I undo a change.

For example: I edited the text property of a node, then hit CMD + Z. A text property ChangedEvent fired - great - but there were also a series of additional ChangedEvents for properties such as fill, stroke and isHighlighted. As far as I'm aware, these properties did not change anywhere in my diagram while I was editing a node's text so I would not have expected to be notified of those property changes when I subsequently used undo.

I am keeping another model in sync with my diagram (we're using the diagram as an editor UI for an existing data model) so I need to observe any changes made when the user performs undo/redo actions.

So I was wondering why these additional events are dispatched, and how they relate to my earlier text-editing action, and I suppose I'm trying to figure out if there's an easy way to identify the events that I can safely ignore?

Using v1.8.2

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles