70001063 remove the previous undo from undo history

Article 70001063
Type Wish
Product WebJS
Version 7010
Date Added 4/21/2017 12:00:00 AM
Fixed 7.7011.0.4 (4/22/2017 12:00:00 AM)
Submitted by Brendan Fry

Summary

Is it possible to remove the previous undo from the history/undo collection?

Solution

In version 7011.0.4 a new property UndoStack was added to vdcanvas.UndoHistory()
It Returns the array of the undo records.

Example :
//remove the last item of undo history
var undostack = vdcanvas.UndoHistory().UndoStack;
if(undostack .length > 0) undostack.length = undostack.length-1; 

Send comments on this topic.