improving module structure and naming

This commit is contained in:
Gavin McDonald
2016-02-19 14:28:15 -05:00
parent 42ca0b6e4b
commit a2479f2d2f
3 changed files with 35 additions and 33 deletions

View File

@@ -1,14 +1,15 @@
import {noop, random} from './utils.js';
import * as utils from './utils';
export {utils};
import OnTap from './onTap.js';
import Point from './point.js';
import Sketch from './sketch.js';
import TileCircle from './tileCircle.js';
import TileSquare from './tileSquare.js';
import TileHexagon from './tileHexagon.js';
export {TileCircle, TileHexagon, TileSquare};
import DrawCircle from './drawCircle.js';
import DrawSquare from './drawSquare.js';
import DrawHexagon from './drawHexagon.js';
export {DrawCircle, DrawHexagon, DrawSquare};
import Cell from './cell.js';
export {Cell};
@@ -17,8 +18,8 @@ export default class Tessellate {
constructor(settings) {
['click', 'draw'].map(method => {this[method] = this[method].bind(this)});
this.drawCB = settings.draw || noop;
this.clickCB = settings.click || noop;
this.drawCB = settings.draw || utils.noop;
this.clickCB = settings.click || utils.noop;
this.element = document.querySelector(settings.element);
this.sketch = new Sketch({