In an onClick-Event I move my elements outside the viewport. Now If I click again, I want them to come back in.
Is there a posibility to read the default position from the myproject_edge.js ? Or is there even an easier way?
Thanks for the help
You could have the default position of the target element in say 2 variables , valuex and valuey in the stage composition ready -
var left = sym.$("Rectangle").css("left");
var top = sym.$("Rectangle").css("top");
Now when the first button to move the object offstage is clicked, it say modifies just the x position as -
sym.$("Rectangle").css( "left", -100);
On clicking the button to bring back the target element back to its original position you could add this snippet -
sym.$("Rectangle").css( "left", sym.getVariable("valuex"));
Attaching a sample file also for reference.
Thanks and Regards,