Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 646 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 646 Bytes

pannable-mixin

Published on webcomponents.org

Web Component mixin that makes elements pannable. By default it will add mouse event listeners to the host element and apply a CSS transform to it whenever it's dragged. You can change the element that the tranform is applied to by calling setPanningElement(). Note that this doesn't change where the mouse event listeners are applied.

You may reset the panning position (i.e. return the element to it's regular position) by calling resetPanning().