Cartographer(id, setReativeTranslation, getPinPoint, getTexturePinPoint, zoominCallback, zoomoutCallback) ⇒ Object
The section of program that provide user intractions with an element. Canvas Drawer uses this to provide zoom in/out and mouse drag option.
Kind: global function
Returns: Object
- Cartographer object
Param | Type | Description |
---|---|---|
id | string |
ID of element in html |
setReativeTranslation | function |
function that set relative translation |
getPinPoint | function |
function that returns mouse pin point |
getTexturePinPoint | function |
function that returns texture pin point |
zoominCallback | function |
function that calls when wants to zoom in to (x, y) |
zoomoutCallback | function |
function that calls when wants to zoom out to (x, y) |
Example
var cartographer = new Cartographer(
id,
setReativeTranslation,
getPinPoint,
getTexturePinPoint,
zoominAction,
zoomoutAction
);