Forum Discussion
Is there a way/javascript code to store and repeat a position an object?
Best to share a sample to work from...then i can show it properly. If using SL360 you can use GSAP's get functionality.
Here some help on GSAP...
A clear explanation of the position parameter...
https://greensock.com/blog/learning/position-parameter/
And then you offcourse need to get the current dynamic position..
https://greensock.com/docs/v3/GSAP/gsap.getProperty()
So with code like this you can get the actual x and y of an element.var myElement = document.querySelector("[data-acc-text='someAccName']");var elXPos = gsap.getProperty(myElement, "x", "px");var elYPos = gsap.getProperty(myElement, "y", "px");console.log("x: "+elXPos+" | y: "+elYPos);Where 'someAccName' is the accessibility name of your element.
Kind regards,
Math
Thank you so much Math for sharing this with me ..
Best,
Related Content
- 12 months ago