KenBkk
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by KenBkk
-
-
In the long run I want to reach this kind of behavior:
http://www.asos.com/asos/asos-stripe-top-with-ruffle-front-tie-waist/prd/7336893 -
-
-
I'm trying to use draggable for zooming in and pan pictures. When I zoom out the picture with scale
TweenLite.set(image, {scaleX:0.5, scaleY:0.5})
then the scrollable overflow size remains the same.
Example:
Draggable is 200x200px
The picture is originally 1000x1000px, so the initial overflow area is 1000x1000px.
After scaling the picture becomes 500x500px but scrollable/draggable remains 1000x1000px. The picture has a 250px margin around is and now I can drag the picture out of sight. What I want is that the overflow area collapses to 500x500px.
I tried skipping scale and set height. Then the scrollable overflow height adapts but not the width. I can drag the image out of sight.In source code I see that then dynamically inserted <div> has a padding-right that causeses this.
How can I fix this? I'm scratching my head for hours now.
Refresh Draggable child overflow size after content resize
in GSAP
Posted
Oh, wow. That's a much better and bigger answer than I expected.
I see 2 issues though:
1. Click location seems not to be working on iPhone (6) so the zoom happens from top left corner regardless of where I click/tap.
2. How do I incorporate pinch/zoom on smartphones? I know hammer.js adds support recognizing those events but how is that added into GSAP?