mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 04:21:24 +01:00
Color picker hatches 14-60
Added hatches to number 14 to 60. Updated the code of the color picker to accept multiples rows of hatches. Changed the size of fillRectPointer from 0.9 em to 1.5 em. Added an Update code to upgrade maps to 1.72 to have a grid of 60 svg hatches. Without the update, loaded files appeared with the rectangles for hatches 14-60 empty.
This commit is contained in:
parent
6981d0f710
commit
847251df58
5 changed files with 196 additions and 30 deletions
|
|
@ -190,7 +190,7 @@ function parseLoadedData(data) {
|
|||
if (customizationMenu.offsetParent) styleTab.click();
|
||||
|
||||
const reliefIcons = document.getElementById("defs-relief").innerHTML; // save relief icons
|
||||
const hatching = document.getElementById("hatching").cloneNode(true); // save hatching
|
||||
const newHatching = document.getElementById("hatching").cloneNode(true); // save hatching
|
||||
|
||||
void (function parseParameters() {
|
||||
const params = data[0].split("|");
|
||||
|
|
@ -474,7 +474,7 @@ function parseLoadedData(data) {
|
|||
if (!layerIsOn("toggleStates")) regions.attr("display", "none").selectAll("path").remove();
|
||||
|
||||
// 1.0 adds hatching
|
||||
document.getElementsByTagName("defs")[0].appendChild(hatching);
|
||||
document.getElementsByTagName("defs")[0].appendChild(newHatching);
|
||||
|
||||
// 1.0 adds zones layer
|
||||
zones = viewbox.insert("g", "#borders").attr("id", "zones").attr("display", "none");
|
||||
|
|
@ -929,6 +929,13 @@ function parseLoadedData(data) {
|
|||
if (layerIsOn("markers")) drawMarkers();
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 1.72) {
|
||||
// v 1.72 changed hatching data
|
||||
document.getElementById("hatching").remove();
|
||||
document.getElementsByTagName("defs")[0].appendChild(newHatching);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
void (function checkDataIntegrity() {
|
||||
|
|
@ -1039,7 +1046,7 @@ function parseLoadedData(data) {
|
|||
// sort markers by index
|
||||
pack.markers.sort((a, b) => a.i - b.i);
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
changeMapSize();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue