click and drag panning
This commit is contained in:
@@ -18,7 +18,7 @@ import ExWhyZee from './exWhyZee.js';
|
||||
|
||||
export default class Tessellate {
|
||||
constructor(settings) {
|
||||
['tap', 'draw', 'drawMap', 'zoom'].map(method => {this[method] = this[method].bind(this)});
|
||||
['tap', 'draw', 'drawMap', 'move', 'zoom'].map(method => {this[method] = this[method].bind(this)});
|
||||
|
||||
this.drawCB = settings.draw || utils.noop;
|
||||
this.clickCB = settings.click || utils.noop;
|
||||
@@ -32,6 +32,7 @@ export default class Tessellate {
|
||||
this.onTap = new OnTap({
|
||||
element: this.element,
|
||||
tap: this.tap,
|
||||
move: this.move,
|
||||
zoom: this.zoom
|
||||
});
|
||||
|
||||
@@ -50,6 +51,10 @@ export default class Tessellate {
|
||||
this.clickCB(event);
|
||||
}
|
||||
|
||||
move(event) {
|
||||
this.xyz.move(event);
|
||||
}
|
||||
|
||||
zoom(event) {
|
||||
this.xyz.zoom(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user