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.