Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
skiplan

Undo/Redo

Recommended Posts

Hello,

I have a user interface which is allow the user to create some contents like add an image, text, video.

This user interface is using the TransformManger.

Is there an (easy) way for implement an undo/redo function?

Thanks for help and the answers

post-8224-0-87887200-1369402015_thumb.jpg

Link to comment
Share on other sites

TransformManager doesn't manage undo/redo functionality for you, but you can certainly do that yourself. One way would be to just record the transform.matrix object for each step because the matrix contains all scale/rotation/position data. I hope that helps!

Link to comment
Share on other sites

Yes, thanks for the answer.
I'd already seen that but i have a lot of data like an image url or a color that transform.matrix does not contains.
So, I don't really know how can I record all this informations.

Link to comment
Share on other sites

How about just using an array to store that data?

 

Also remember there's an exportItemXML() method and exportFullXML(). That won't save any color data, though. http://greensock.com/as/docs/transform/

Link to comment
Share on other sites

  • 7 months later...

Hello,

I want to use Crop functionality with Transform. Can you please customize your tool with Undo/Redo feature.

Regards,
FlexCoder

Link to comment
Share on other sites

Sorry, FlexCoder, that isn't a feature we plan to add at this point, but you're welcome to customize things as you please. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×