From b1956da3e4ac11dc2b53708311a624ab7fdb64f8 Mon Sep 17 00:00:00 2001 From: Gavin McDonald Date: Sun, 6 Jan 2019 16:21:41 -0500 Subject: [PATCH] radius overrides height and width --- src/tessellate.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tessellate.js b/src/tessellate.js index dd456d2..fe55dc6 100644 --- a/src/tessellate.js +++ b/src/tessellate.js @@ -113,6 +113,7 @@ export class Tessellate { const cartographer = selectCartographer(this.settings.board, this.settings.orientation); this.cartographer = new cartographer(Object.assign(this.sketch.getSize(), funky.pick(this.settings, [ + 'adjustScaleMin', 'centerX', 'centerY', 'height', @@ -130,6 +131,11 @@ export class Tessellate { this.settings.element = this.settings.element instanceof HTMLElement ? this.settings.element : document.querySelector(this.settings.element); + if (this.settings.radius) { + this.settings.height = this.settings.radius * 2 + 1; + this.settings.width = this.settings.radius * 2 + 1; + } + if (this.settings.negativeTiles) { if (this.settings.height && (this.settings.height % 2 === 0)) { this.settings.height++;