Jump to content
Search Community

zagdxb

Members
  • Posts

    3
  • Joined

  • Last visited

zagdxb's Achievements

0

Reputation

  1. Nice example, just what I need to do, but only with Tweenlite. My slider and draggable are working fine while resized to any size. Only issue is with setting the initial position when the page is loaded and the viewbox is resized. Check out the same codepen full screen and in editor https://codepen.io/zagdxb/pen/xBRoRo https://codepen.io/zagdxb/full/xBRoRo The x of slider should be all the way on the right limit of the background rectangle. current_value is 35, and my min/max are 15-35, and it is not. I'll give a good look at the example, it seems the answer is in there somewhere.
  2. Hi, I have an interesting(for me) issue I couldn't figure out. The code performs as I expect it to, setting the slider initial position depending on value of "current_value" variable, but only if I don't set the SVG Viewbox with Snap, on document ready. On the Code pen, you can remove that part at the beginning of $(document).ready and the slider sets the initial position correct. If the ViewBox is set, then the slider sets itself on some weird position I couldn't figure out. Mostly it goes out of bounds on the right, depending on the screen size. Try to view same code pen full screen. -> this I'm sorry if the codepen is messy, I tried clearing it out as much as I could. It is imperative for me to have the viewbox set, for resizing and centering the whole SVG. I feel like I need to tell Greensock that the view box has changed with Snap or something like that. Help? What did I miss? Thanks One below is working as expected, only this was removed on load ////remove below var svg = Snap('#svg'); svg.attr({ viewBox: "0 0 1280 720", width: "100%", height: "100%" }); //////////remove to here This one setting the initial position of the slider wrong:
×
×
  • Create New...