Quote from
luishp on January 26, 2021, 8:04 am
Hi @paultomo,
That's a good idea :)
I will add this functionality to the soon to be released next version. Meanwhile, please do this:
Go to:
Project > Subroutines...
Choose New JavaScript Subroutine from the New Subroutine icon.
Give a name to the subroutine (ie: undoDraw) and add this code:
var lastItemIndex = (window["CanvasContainer1"].getObjects().length - 1);
var item = window["CanvasContainer1"].item(lastItemIndex);
if(item.get('type') === 'path') {
window["CanvasContainer1"].remove(item);
window["CanvasContainer1"].renderAll();
}
If your Container object name is different than Container1 just change it.
Done :)
Now you have a new undoDraw command.
Hi @paultomo,
That's a good idea :)
I will add this functionality to the soon to be released next version. Meanwhile, please do this:
Go to:
Project > Subroutines...
Choose New JavaScript Subroutine from the New Subroutine icon.
Give a name to the subroutine (ie: undoDraw) and add this code:
var lastItemIndex = (window["CanvasContainer1"].getObjects().length - 1);
var item = window["CanvasContainer1"].item(lastItemIndex);
if(item.get('type') === 'path') {
window["CanvasContainer1"].remove(item);
window["CanvasContainer1"].renderAll();
}
If your Container object name is different than Container1 just change it.
Done :)
Now you have a new undoDraw command.
Vadim and paultomo have reacted to this post.