Jump to content
Search Community

blendingpoint

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by blendingpoint

  1. Neither did we until blendingpoint informed us of the issue:)

     

    Blendingpoint,

     

    We made some changes to DrawSVG to accommodate percentage-based width and height.

     

    I forked your pen and added the latest beta of DrawSVGPlugin.

     

    See the Pen RKWYGZ by GreenSock (@GreenSock) on CodePen

     

    Please experiment with it and let us know if it works to your liking. 

    *the beta version being used will only work in CodePen

    Super!

    I try this beta and it works, unfortunately I can't use it out of codepen and I don't know if this beta version works for my singular case.

    Anyway thanks for the very great service!

  2. Hi blendingpoint  :)

     

    Welcome to the GreenSock forums.

     

    Looks like the plugin is running into some trouble calculating the path length since you'e setting all your sizes via percentage. If you set a viewBox size and then set the rectangle to that size, it should all work fine. Please keep in mind that you don't have to set the width of an SVG to 100%. It will automatically scale to 100% of the width of its parent unless you tell it otherwise. Also keep in mind that only half the stroke will show with that setup. All strokes are aligned to the middle so a rectangle that is the full width and height of the SVG parent will cut off the outside part of the stroke.

     

    Here's a fork of your pen with those changes.

     

    See the Pen XpmYga by PointC (@PointC) on CodePen

     

    Hopefully that makes sense helps a little bit.

     

    Happy tweening and welcome aboard.

    Thank you! Now I understand the problem and I can fix my code keeping in mind this thing!

×
×
  • Create New...