mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.5.57 - fix when pole is required for province without cells
This commit is contained in:
parent
4c4caa6ff7
commit
4560c5d05d
2 changed files with 5 additions and 5 deletions
|
|
@ -316,7 +316,7 @@ function highlightEmblemElement(type, el) {
|
|||
return;
|
||||
}
|
||||
|
||||
const [x, y] = el.pole;
|
||||
const [x, y] = el.pole || pack.cells.p[el.center];
|
||||
const obj = type === "state" ? cells.state : cells.province;
|
||||
const borderCells = cells.i.filter(id => obj[id] === i && cells.c[id].some(n => obj[n] !== i));
|
||||
const data = Array.from(borderCells).filter((c, i) => !(i%2)).map(i => cells.p[i]).map(i => [i[0], i[1], Math.hypot(i[0]-x, i[1]-y)]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue