Lin Thike Aung
Lin Thike Aung

Reputation: 1

Get animation object location value when drag other object in Google Web designer

I want to get animation object.location in gwd when drag other object . Animation Object is moving y axis and drag item is waiting to get that animation object x axis. What should I do ?

Dragstart code event

gwd.dragger = this; event = (event.changedTouches ? event.changedTouches[0] : event); gwd.s = window.getComputedStyle ? getComputedStyle(this, null) : this.currentStyle; gwd.dX = event.pageX - parseInt(gwd.s["left"]); gwd.dY = event.pageY - parseInt(gwd.s["top"]);

Dragmove drag event

if (gwd.dragger) { event = (event.changedTouches ? event.changedTouches[0] : event); gwd.actions.events.setInlineStyle(gwd.dragger.id, "left:" + (event.pageX - gwd.dX) + "px; top:" + (event.pageY - gwd.dY) + "px"); }

Dragstop event

gwd.dragger = null;

I want to get animated item left and top values pixel when drag

You can see this my ads.

https://doc-14-10-adspreview.googleusercontent.com/preview/9o5bees06oeguhr10neq55qcti27eh7n/2ma5s2dmjnvulveo4uos4qfu7ifos8ps/1664409600000/90358308/previewuser/gwd.90358308?render=blank&creativeId=gwd.90358308&irsk=CICAgODErP3t8gE&ecId=AOgHqNpAgFX7nq3p6KSPl2n47gS0-gxu3Aa9jhkOsuFMEnrCJDOlIJQMG7XhxKQuzLKQN98dGl9n

Upvotes: 0

Views: 57

Answers (0)

Related Questions