mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-23 07:37:24 +01:00
fix: update type definitions and improve renderer initialization in draw-relief-icons
This commit is contained in:
parent
828534ebd9
commit
ffe350bca8
4 changed files with 19 additions and 13 deletions
|
|
@ -4,10 +4,12 @@ function editReliefIcon() {
|
|||
closeDialogs(".stable");
|
||||
|
||||
// Switch from WebGL to editable SVG <use> elements
|
||||
undrawRelief();
|
||||
drawRelief("svg");
|
||||
if (!layerIsOn("toggleRelief")) {
|
||||
undrawRelief();
|
||||
turnButtonOn("toggleRelief");
|
||||
drawRelief("svg");
|
||||
}
|
||||
|
||||
if (!layerIsOn("toggleRelief")) toggleRelief();
|
||||
terrain.selectAll("use").call(d3.drag().on("drag", dragReliefIcon)).classed("draggable", true);
|
||||
|
||||
// Click-to-select: delegation on the terrain group covers existing and newly added <use> elements.
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ function processFeatureRegeneration(event, button) {
|
|||
drawStateLabels();
|
||||
} else if (button === "regenerateReliefIcons") {
|
||||
generateReliefIcons();
|
||||
if (!layerIsOn("toggleRelief")) toggleRelief();
|
||||
layerIsOn("toggleRelief") ? drawRelief() : toggleRelief();
|
||||
} else if (button === "regenerateRoutes") {
|
||||
regenerateRoutes();
|
||||
if (!layerIsOn("toggleRoutes")) toggleRoutes();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue