radius overrides height and width
This commit is contained in:
@@ -113,6 +113,7 @@ export class Tessellate {
|
|||||||
|
|
||||||
const cartographer = selectCartographer(this.settings.board, this.settings.orientation);
|
const cartographer = selectCartographer(this.settings.board, this.settings.orientation);
|
||||||
this.cartographer = new cartographer(Object.assign(this.sketch.getSize(), funky.pick(this.settings, [
|
this.cartographer = new cartographer(Object.assign(this.sketch.getSize(), funky.pick(this.settings, [
|
||||||
|
'adjustScaleMin',
|
||||||
'centerX',
|
'centerX',
|
||||||
'centerY',
|
'centerY',
|
||||||
'height',
|
'height',
|
||||||
@@ -130,6 +131,11 @@ export class Tessellate {
|
|||||||
this.settings.element = this.settings.element instanceof HTMLElement ? this.settings.element :
|
this.settings.element = this.settings.element instanceof HTMLElement ? this.settings.element :
|
||||||
document.querySelector(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.negativeTiles) {
|
||||||
if (this.settings.height && (this.settings.height % 2 === 0)) {
|
if (this.settings.height && (this.settings.height % 2 === 0)) {
|
||||||
this.settings.height++;
|
this.settings.height++;
|
||||||
|
|||||||
Reference in New Issue
Block a user