fix: set max gap to scale/2 - 1
This commit is contained in:
parent
326844fe1c
commit
4ed6418c28
1 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,9 @@ addEventListener('DOMContentLoaded', () => {
|
||||||
const mask = options.mask.value
|
const mask = options.mask.value
|
||||||
const size = Number(options.size.value)
|
const size = Number(options.size.value)
|
||||||
const scale = Number(options.scale.value)
|
const scale = Number(options.scale.value)
|
||||||
const gap = Math.min(Number(options.gap.value), scale) // not more than 1 module scaled size
|
// not more than (half of 1 scaled module size) - 1
|
||||||
|
// at gap=scale/2 squares disappear
|
||||||
|
const gap = Math.min(Number(options.gap.value), intDiv(scale, 2) - 1)
|
||||||
|
|
||||||
const wh = scale - gap * 2 // width&height for 1 module with grid gap
|
const wh = scale - gap * 2 // width&height for 1 module with grid gap
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue