This is a migrated thread and some comments may be shown as answers.

Undo in Custom Tool

1 Answer 83 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
MNP
Top achievements
Rank 1
MNP asked on 12 Aug 2011, 07:11 PM
I noticed in your watermark example, any change isn't saved on the undo stack.

Is there a way on a custom tool you can programmically add to the undo stack?

Thanks

-Matt

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 17 Aug 2011, 03:30 PM
Hello Matt,

There are two types of operations that can be performed on an image in the editor - Tools and Commands. You can read more about the difference between the two and how they work here.
In a nut shell, tools are able to generate a live preview of the effect you are applying on the image with different parameters. When you hit enter, the tool is committed, i.e. a command with the parameters from its SettingsUI is executed and registered in the undo/redo stack. Then, the effect of this command can be reversed and reapplied on undo/redo.
I hope this helps.

Best wishes,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
ImageEditor
Asked by
MNP
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or