default to no draw delay but allow as a setting
This commit is contained in:
@@ -13,7 +13,7 @@ export default class Sketch {
|
|||||||
|
|
||||||
this.draw = settings.draw || noop;
|
this.draw = settings.draw || noop;
|
||||||
this.resize = settings.resize || noop;
|
this.resize = settings.resize || noop;
|
||||||
this.drawDelay = settings.drawDelay || 50;
|
this.drawDelay = settings.drawDelay;
|
||||||
this.container = settings.element || document.body;
|
this.container = settings.element || document.body;
|
||||||
|
|
||||||
window.addEventListener('resize', this.onResize);
|
window.addEventListener('resize', this.onResize);
|
||||||
|
|||||||
@@ -95,11 +95,11 @@ export class Tessellate {
|
|||||||
|
|
||||||
this.checkSettings(settings);
|
this.checkSettings(settings);
|
||||||
|
|
||||||
this.sketch = new Sketch({
|
this.sketch = new Sketch(Object.assign({
|
||||||
element: this.settings.element,
|
element: this.settings.element,
|
||||||
draw: this.draw,
|
draw: this.draw,
|
||||||
resize: this.resize,
|
resize: this.resize,
|
||||||
});
|
}, funky.pick(this.settings, ['drawDelay'])));
|
||||||
|
|
||||||
this.onTap = new OnTap(Object.assign({
|
this.onTap = new OnTap(Object.assign({
|
||||||
element: this.settings.element,
|
element: this.settings.element,
|
||||||
|
|||||||
Reference in New Issue
Block a user