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

Disable undo manager will cause link changed event not fired?

$
0
0

@chzh.austin wrote:

Hi GoJS group,

I realize if I set undoManager.isEnabled to false in my diagram, I will no longer get go.ChangedEvent.Insert from model changedListener fired? Actually, evt.object is always null. If I mark isEnable to true, everything just works fine. Are they related?

    if (!evt.isTransactionFinished) return;

    let txn = evt.object;  // a Transaction
    if (txn === null) return;

    // iterate over all of the actual ChangedEvents of the Transaction
    txn.changes.each((e) => {
        if (e.change === go.ChangedEvent.Insert) {
            if (e.modelChange === "nodeDataArray") { // add node
              ................
            } else if (e.modelChange === "linkDataArray") { // add link
              ................
            }
        }

Thanks,
Chuan

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles