Shouha
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Shouha
-
-
please the below 2 pencode the first 1 work just find while using gsap2 but the second one not working after convert to gsap3
please click on the button "Rotate Rectangle" to see the problem that i am looking for
working pen
See the Pen gOJmoMW by Shouha85 (@Shouha85) on CodePen
notworking pen
See the Pen WNBpdXK?editors=0010 by Shouha85 (@Shouha85) on CodePen
-
i am trying to figure out hot to get the position of SVG element after transformation like rotation
please check the below link from 2019 as i built some drawing tool using some features of gsap2
-
is there are any method in gsap 3 that return the position of SVG element after applying transformation on it like rotation, scaling or resize ?
-
i am not sure if had a chance to look at the above pen, do you need more simplify pen?
-
Dear,
please check the below pen as proof concept
the belowpen are worked perfectly on GSAP2 can you convert it to GSAP3, and you can check the use of xOffset,
please add a rectangular table and rezise it from top left corner for example
your help is very appreciated
See the Pen XWNdPoG?editors=1000 by Shouha85 (@Shouha85) on CodePen
-
i am using gsap 2 and i want to upgrade to gsap3 but iam facing major issue that i use _gsTransform.xOffset on SVG object after set new scalex and scaley and x and y but the value of _gsTransform.xOffset return in gsap2 is different than gsap.getProperty(obj,"xOffset") value, actually the value of gsap.getProperty(obj,"xOffset") always 0
please advise
-
i have resolved the issue by using the xOffset and yOffset in getting position like below
var ctr = Draggable.get("#g1");
var x =ctr.x + ctr.target._gsTransform.xOrigin + ctr.target._gsTransform.xOffset;
var y=ctr.y + ctr.target._gsTransform.yOrigin + ctr.target._gsTransform.yOffset;- 1
-
Dears,
i have created an svg rect inside a group and i have make this svg group to have "transformOrigin:'center center' " explicitly then draw a little blue circle at this group returned position
my question is
when i am trying to rotate the svg group then resize it the return location is wrong and it's not at the center of this group, how i can keep my reference point at the center of this group all the time with all different transformation?
See the Pen MWgxNwP?editors=1010 by Shouha85 (@Shouha85) on CodePen
Get SVG Element Position
in GSAP
Posted
Dear,
thanks for reply,
i am not totaly aware of this plugin but based on what i read i don't think so this can help me as i don't have parent child situation and i am not talking about local coordinate i just want to find the top left corner of the rect even after make some tranformation like the rotation, i did this in gsap 2 but unable to do it in gsap3