mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
parent
e9ec667be9
commit
f5c507a94b
2 changed files with 18 additions and 1 deletions
|
|
@ -902,6 +902,7 @@
|
|||
<input id="markerIconStroke" onmouseover="tip('Change marker icon stroke color')" type="color" class="editColor" value="#000000">
|
||||
</div>
|
||||
|
||||
<button id="markerToggleBubble" onmouseover="tip('Toggle marker bubble display')" class="icon-info-circled"></button>
|
||||
<button id="markerLegendButton" onmouseover="tip('Edit place legend (free text notes)')" class="icon-edit"></button>
|
||||
<button id="markerAdd" onmouseover="tip('Add additional marker of that type')" class="icon-plus"></button>
|
||||
<button id="markerRemove" onmouseover="tip('Remove the marker')" class="icon-trash"></button>
|
||||
|
|
|
|||
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