mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
parent
e9ec667be9
commit
f5c507a94b
2 changed files with 18 additions and 1 deletions
16
script.js
16
script.js
|
|
@ -3946,6 +3946,8 @@ function fantasyMap() {
|
|||
markerSize.value = elSelected.attr("data-size");
|
||||
markerBase.value = symbol.select("path").attr("fill");
|
||||
markerFill.value = symbol.select("circle").attr("fill");
|
||||
let opacity = symbol.select("circle").attr("opacity");
|
||||
markerToggleBubble.className = opacity === "0" ? "icon-info" : "icon-info-circled";
|
||||
|
||||
let table = document.getElementById("markerIconTable");
|
||||
let selected = table.getElementsByClassName("selected");
|
||||
|
|
@ -4315,6 +4317,20 @@ function fantasyMap() {
|
|||
d3.select("#defs-markers").select(id).select("text").attr("stroke", this.value);
|
||||
});
|
||||
|
||||
// toggle marker bubble display
|
||||
document.getElementById("markerToggleBubble").addEventListener("click", function() {
|
||||
let id = elSelected.attr("href");
|
||||
let show = 1;
|
||||
if (this.className === "icon-info-circled") {
|
||||
this.className = "icon-info";
|
||||
show = 0;
|
||||
} else {
|
||||
this.className = "icon-info-circled";;
|
||||
}
|
||||
d3.select(id).select("circle").attr("opacity", show);
|
||||
d3.select(id).select("path").attr("opacity", show);
|
||||
});
|
||||
|
||||
// open legendsEditor
|
||||
document.getElementById("markerLegendButton").addEventListener("click", function() {
|
||||
let id = elSelected.attr("id");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue