tsl_pan_library
v1.0.7
Published
panning library for cross browser
Downloads
13
Readme
tsl_pan_library
WIP Panning library. Phase 1 complete
NPM registered
The package can be found here
Example
To see the library in action go here
Code documentation
In depth code documentation here.
Code Quick start
- Install with npm:
npm install tsl_pan_library. - Import to project:
import 'PanLibrary' from 'tsl_pan_library'. - Use the new keyword to create a pannable object.
- Pass a container and a pannable element to the constructor.
- optional x and y positions.
Example
import PanningLibrary from "./panninglibrary";
window.addEventListener("DOMContentLoaded", () => {
let container = document.querySelector(".container");
let content = document.querySelector(".content");
new PanningLibrary(container, content, -20, -20);
});