mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
Import resource-editor correctly
This commit is contained in:
parent
bcbb670f00
commit
51542ac7be
3 changed files with 9 additions and 8 deletions
|
|
@ -1897,11 +1897,11 @@ function toggleResources(event) {
|
|||
}
|
||||
|
||||
function drawResources() {
|
||||
console.time('drawResources');
|
||||
console.time("drawResources");
|
||||
const someArePinned = pack.resources.some((resource) => resource.pinned);
|
||||
const drawCircle = +goods.attr('data-circle');
|
||||
const drawCircle = +goods.attr("data-circle");
|
||||
|
||||
let resourcesHTML = '';
|
||||
let resourcesHTML = "";
|
||||
for (const i of pack.cells.i) {
|
||||
if (!pack.cells.resource[i]) continue;
|
||||
const resource = Resources.get(pack.cells.resource[i]);
|
||||
|
|
@ -1909,10 +1909,10 @@ function drawResources() {
|
|||
const [x, y] = pack.cells.p[i];
|
||||
const stroke = Resources.getStroke(resource.color);
|
||||
|
||||
if (!drawCircle) {
|
||||
resourcesHTML += `<use data-i="${resource.i}" href="#${resource.icon}" x="${x - 3}" y="${y - 3}" width="6" height="6"/>`;
|
||||
continue;
|
||||
}
|
||||
// if (!drawCircle) {
|
||||
// resourcesHTML += `<use data-i="${resource.i}" href="#${resource.icon}" x="${x - 3}" y="${y - 3}" width="6" height="6"/>`;
|
||||
// continue;
|
||||
// }
|
||||
|
||||
resourcesHTML += `<g>
|
||||
<circle data-i="${resource.i}" cx=${x} cy=${y} r="3" fill="${resource.color}" stroke="${stroke}" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
'use strict';
|
||||
"use strict";
|
||||
function editResources() {
|
||||
if (customization) return;
|
||||
closeDialogs('#resourcesEditor, .stable');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue