Jump to content
GreenSock

DraggablePlugin

.scrollProxy

.scrollProxy : Object

[read-only] A special object that gets created for type: "scroll" (or "scrollTop" or "scrollLeft") Draggables. This object manages the scrolling behavior, applying the necessary transforms or margins to accomplish overscrolling when necessary.

Details

Number - A special object that gets created for type: "scroll" (or scrollTop or scrollLeft) Draggables. This object manages the scrolling behavior, applying the necessary transforms or margins to accomplish overscrolling when necessary. The scrollProxy object has a top() and left() getter and setter methods (and scrollTop() and scrollLeft() which are simply the inverse of top() and left()). If you need to get the scrolling velocity, make sure you’ve loaded ThrowPropsPlugin and set throwProps: true on the Draggable and then you can use ThrowPropsPlugin.getVelocity(yourDraggable.scrollProxy, "top") to get the vertical scrolling velocity (use "left" for horizontal).

Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×