mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
econonics - restore from feb
This commit is contained in:
parent
c4710de7db
commit
b9db7edf43
2 changed files with 7 additions and 4 deletions
1
main.js
1
main.js
|
|
@ -77,6 +77,7 @@ let prec = viewbox.append("g").attr("id", "prec").style("display", "none");
|
||||||
let population = viewbox.append("g").attr("id", "population");
|
let population = viewbox.append("g").attr("id", "population");
|
||||||
let goods = viewbox.append('g').attr('id', 'goods');
|
let goods = viewbox.append('g').attr('id', 'goods');
|
||||||
let emblems = viewbox.append("g").attr("id", "emblems").style("display", "none");
|
let emblems = viewbox.append("g").attr("id", "emblems").style("display", "none");
|
||||||
|
let goods = viewbox.append("g").attr("id", "goods");
|
||||||
let labels = viewbox.append("g").attr("id", "labels");
|
let labels = viewbox.append("g").attr("id", "labels");
|
||||||
let icons = viewbox.append("g").attr("id", "icons");
|
let icons = viewbox.append("g").attr("id", "icons");
|
||||||
let burgIcons = icons.append("g").attr("id", "burgIcons");
|
let burgIcons = icons.append("g").attr("id", "burgIcons");
|
||||||
|
|
|
||||||
|
|
@ -136,12 +136,14 @@ function showMapTooltip(point, e, i, g) {
|
||||||
tip(`${name} ${type} emblem. Click to edit. Hold Shift to show associated area or place`);
|
tip(`${name} ${type} emblem. Click to edit. Hold Shift to show associated area or place`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (group === 'goods') {
|
|
||||||
const id = +e.target.dataset.i;
|
if (group === "goods") {
|
||||||
const resource = pack.resources.find((resource) => resource.i === id);
|
const id = +e.target.getAttribute("href").slice(10);
|
||||||
tip('Resource: ' + resource.name);
|
const resource = pack.resources.find(resource => resource.i === id);
|
||||||
|
tip("Resource: " + resource.name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group === "rivers") {
|
if (group === "rivers") {
|
||||||
const river = +e.target.id.slice(5);
|
const river = +e.target.id.slice(5);
|
||||||
const r = pack.rivers.find(r => r.i === river);
|
const r = pack.rivers.find(r => r.i === river);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue