radius overrides height and width

This commit is contained in:
Gavin McDonald
2019-01-06 16:21:41 -05:00
parent 7c3ee5b475
commit b1956da3e4

View File

@@ -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++;