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

Get List of Action Names Prior to Save

1 Answer 15 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Yazan
Top achievements
Rank 1
Yazan asked on 28 Dec 2015, 11:45 PM
I've implemented the Image Editor custom save. My goal is to get a list of the actions performed on the image. Like: ["Pencil", "DrawCircle", DrawRectangle"]. I know that the desired list does get populated when clicking on the undo button (the little arrow part). My problem is that I couldn't find a way to get access to this list (neither from client nor from the server side). The reason I need that list is that I have to log the steps that led to the enhanced image. Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vessy
Telerik team
answered on 29 Dec 2015, 03:59 PM
Hi Yazan,

The undo stack containing all commands executed in RadImageEditor can be accessed on the client-side in a similar way:
function myfunction() {
    var imageEditor = $find("<%=RadImageEditor1.ClientID %>");
    var undoStack = imageEditor._undoStack.slice();
    for (var i = 0; i < undoStack.length; i++) {
        console.log(undoStack[i].get_name());
    }
}

I hope this helps.

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ImageEditor
Asked by
Yazan
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or