3

Salaamun Alekum

While I Am Using GOJS Undo Operation Using Command Of My Code

diag.commandHandler.undo();

It Is Showing Me Following Mentioned Error In Console Of Browser

property set error: Error: Picture.element must be an instance of Image, Canvas, or Video.

And After Using Undo When I Use Redo diag.commandHandler.redo(); Function Then Nodes Data Array diagram.model.nodeDataArray; Gives Null

Can Anyone Identify What Could Be The Root Cause

Thank You

Ali Jamal
  • 844
  • 11
  • 19
  • 1
    do you have `canUndo()` set to true at the object. – Jai Nov 26 '15 at 08:14
  • 1
    http://gojs.net/latest/api/symbols/UndoManager.html#undo – Jai Nov 26 '15 at 08:14
  • Reverse the effects of the transactionToUndo. canUndo must be true for this method to have any effect. This is called by CommandHandler.undo. This will raise a "StartingUndo" ChangedEvent of type ChangedEvent.Transaction, perform the Transaction.undo on the transactionToUndo, and then raise a "FinishedUndo" ChangedEvent of type ChangedEvent.Transaction. The two ChangedEvents are to let model listeners know that an undo is about to take place and that it just finished. isUndoingRedoing will temporarily be set to true during this operation. – Ali Jamal Nov 26 '15 at 09:49
  • Thank You @Jai But How To Set It True – Ali Jamal Nov 26 '15 at 09:49

1 Answers1

3

This was a bug in the library, which is fixed in version 1.5.14.

Thanks for reporting the bug.

Walter Northwoods
  • 4,061
  • 2
  • 10
  • 16