mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
Rebase, add functionality to Resources editor.
This commit is contained in:
parent
063c440c37
commit
efbca32881
3 changed files with 101 additions and 101 deletions
|
|
@ -987,7 +987,7 @@ function toggleResources(event) {
|
|||
function 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 = '';
|
||||
for (const i of pack.cells.i) {
|
||||
|
|
@ -997,10 +997,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}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue