Pan Directive for Angular.js - Drag to scroll behavior
Usage
Add panhandler
as an attribute to the element on which you would like to enable panning. Thats it! If you would like to make sure your inner content fits to a certain size, you can specify a content-{width|height}
attribute.
Advanced Usage
If you need to disable panning (temporarily) for some of the content elements,
you can set the preventPan
attribute on the panhandler element to true.
This is useful in the case that you would like to enable drag-n-drop for some elements within the pannable area.
Example
Javascript
angular ;
HTML
Stuff to pan around!
Prevent Example
HTML
Prevent Panning Stuff to pan around!
Prevent Pan on item
HTML
Prevent Panning
Development
For development, you will need node.js installed.
After that, run the following from the repo directory
npm install grunt-cli bower -gnpm installbower installgrunt
Should get you going!
License
MIT License
Contributors and Acknowledgements
Thanks goes out these contributors and/or users.
@gtczap @ggggino @Konkko @civilframe @amrsh