mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
color picker behavior update
This commit is contained in:
parent
4d74081821
commit
fedc3ea5a3
6 changed files with 50 additions and 38 deletions
|
|
@ -1330,10 +1330,12 @@ function drawResources() {
|
|||
let resourcesHTML = "";
|
||||
for (const i of pack.cells.i) {
|
||||
if (!pack.cells.resource[i]) continue;
|
||||
const resource = pack.resources.find(resource => resource.i === pack.cells.resource[i]);
|
||||
const resource = Resources.get(pack.cells.resource[i]);
|
||||
const [x, y] = pack.cells.p[i];
|
||||
const stroke = Resources.getStroke(resource.color);
|
||||
|
||||
resourcesHTML += `<g>
|
||||
<circle data-i="${resource.i}" cx=${x} cy=${y} r="3" fill="${resource.color}" stroke="${resource.stroke}" />
|
||||
<circle data-i="${resource.i}" cx=${x} cy=${y} r="3" fill="${resource.color}" stroke="${stroke}" />
|
||||
<use href="#${resource.icon}" x="${x-3}" y="${y-3}" width="6" height="6"/>
|
||||
</g>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue