Jump to content
Search Community

Shouha

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Shouha

  1. 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

  2. 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

  3. 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;

    • Like 1
  4. 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

×
×
  • Create New...