diff --git a/main.js b/main.js
index 111fbf21..6d52dd97 100644
--- a/main.js
+++ b/main.js
@@ -134,13 +134,6 @@ fogging
.attr("fill", "#e8f0f6")
.attr("filter", "url(#splotch)");
-texture
- .append("image")
- .attr("id", "textureImage")
- .attr("preserveAspectRatio", "xMidYMid slice")
- .attr("width", "100%")
- .attr("height", "100%");
-
// assign events separately as not a viewbox child
scaleBar.on("mousemove", () => tip("Click to open Units Editor")).on("click", () => editUnits());
legend
@@ -1955,7 +1948,9 @@ const regenerateMap = debounce(async function (options) {
// clear the map
function undraw() {
- viewbox.selectAll("path, circle, polygon, line, text, use, #zones > g, #armies > g, #ruler > g").remove();
+ viewbox
+ .selectAll("path, circle, polygon, line, text, use, #texture > image, #zones > g, #armies > g, #ruler > g")
+ .remove();
document
.getElementById("deftemp")
.querySelectorAll("path, clipPath, svg")
diff --git a/modules/dynamic/auto-update.js b/modules/dynamic/auto-update.js
index b88e7d43..30e07cd8 100644
--- a/modules/dynamic/auto-update.js
+++ b/modules/dynamic/auto-update.js
@@ -638,19 +638,6 @@ export function resolveVersionConflicts(version) {
}
if (version < 1.91) {
- // from v1.90.02 texture image is always there
- if (!texture.select("#textureImage").size()) {
- // cleanup old texture if it has no id and add new one
- texture.selectAll("*").remove();
- texture
- .append("image")
- .attr("id", "textureImage")
- .attr("width", "100%")
- .attr("height", "100%")
- .attr("preserveAspectRatio", "xMidYMid slice")
- .attr("src", "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/marble-big.jpg");
- }
-
// from 1.91.00 custom coa is moved to coa object
pack.states.forEach(state => {
if (state.coa === "custom") state.coa = {custom: true};
@@ -704,19 +691,23 @@ export function resolveVersionConflicts(version) {
labels.selectAll("tspan").each(function () {
this.setAttribute("x", 0);
});
+ }
- // leftover from v1.90.02
+ if (version < 1.94) {
+ // from v1.94.00 texture image is removed when layer is off
texture.style("display", null);
- const textureImage = texture.select("#textureImage");
- if (textureImage.size()) {
- const xlink = textureImage.attr("xlink:href");
- const href = textureImage.attr("href");
- const src = xlink || href;
- if (src) {
- textureImage.attr("src", src);
- textureImage.attr("xlink:href", null);
- }
+ const textureImage = texture.select("image");
+ if (textureImage.size()) {
+ // restore parameters
+ const x = Number(textureImage.attr("x") || 0);
+ const y = Number(textureImage.attr("y") || 0);
+ const href = textureImage.attr("xlink:href") || textureImage.attr("href") || textureImage.attr("src");
+ // save parameters to parent element
+ texture.attr("data-href", href).attr("data-x", x).attr("data-y", y);
+ // recreate image in expected format
+ textureImage.remove();
+ drawTexture();
}
}
}
diff --git a/modules/io/export.js b/modules/io/export.js
index aee9dbc8..402342a2 100644
--- a/modules/io/export.js
+++ b/modules/io/export.js
@@ -252,12 +252,12 @@ async function getMapURL(type, options = {}) {
// replace texture href to base64
if (location.hostname) {
- const el = cloneEl.getElementById("textureImage");
- const url = el?.getAttribute("href");
- if (url) {
+ const image = document.querySelector("#texture > image");
+ if (image) {
+ const url = image.getAttribute("href");
await new Promise(resolve => {
getBase64(url, base64 => {
- el.setAttribute("href", base64);
+ image.setAttribute("href", base64);
resolve();
});
});
diff --git a/modules/io/load.js b/modules/io/load.js
index 61788af9..c4d062ee 100644
--- a/modules/io/load.js
+++ b/modules/io/load.js
@@ -415,7 +415,7 @@ async function parseLoadedData(data) {
.forEach(el => el.classList.add("buttonoff"));
// turn on active layers
- if (notHidden(texture) && hasChild(texture, "image")) turnOn("toggleTexture");
+ if (hasChild(texture, "image")) turnOn("toggleTexture");
if (hasChildren(terrs)) turnOn("toggleHeight");
if (hasChildren(biomes)) turnOn("toggleBiomes");
if (hasChildren(cells)) turnOn("toggleCells");
@@ -468,6 +468,12 @@ async function parseLoadedData(data) {
}
}
+ {
+ // add custom texture if any
+ const textureHref = texture.attr("data-href");
+ updateTextureSelectValue(textureHref);
+ }
+
void (function checkDataIntegrity() {
const cells = pack.cells;
diff --git a/modules/ui/layers.js b/modules/ui/layers.js
index fc1943d6..c2188ab0 100644
--- a/modules/ui/layers.js
+++ b/modules/ui/layers.js
@@ -157,6 +157,7 @@ function getCurrentPreset() {
// run on map regeneration
function restoreLayers() {
+ if (layerIsOn("toggleTexture")) drawTexture();
if (layerIsOn("toggleHeight")) drawHeightmap();
if (layerIsOn("toggleCells")) drawCells();
if (layerIsOn("toggleGrid")) drawGrid();
@@ -1509,18 +1510,30 @@ function toggleRelief(event) {
function toggleTexture(event) {
if (!layerIsOn("toggleTexture")) {
turnButtonOn("toggleTexture");
- // href is not set directly to avoid image loading when layer is off
- const textureImage = byId("textureImage");
- if (textureImage) textureImage.setAttribute("href", textureImage.getAttribute("src"));
-
+ drawTexture();
if (event && isCtrlClick(event)) editStyle("texture");
} else {
if (event && isCtrlClick(event)) return editStyle("texture");
turnButtonOff("toggleTexture");
- texture.select("image").attr("href", null);
+ texture.select("image").remove();
}
}
+function drawTexture() {
+ const x = Number(texture.attr("data-x") || 0);
+ const y = Number(texture.attr("data-y") || 0);
+ const href = texture.attr("data-href");
+
+ texture
+ .append("image")
+ .attr("preserveAspectRatio", "xMidYMid slice")
+ .attr("x", x)
+ .attr("y", y)
+ .attr("width", graphWidth - x)
+ .attr("height", graphHeight - y)
+ .attr("href", href);
+}
+
function toggleRivers(event) {
if (!layerIsOn("toggleRivers")) {
turnButtonOn("toggleRivers");
diff --git a/modules/ui/options.js b/modules/ui/options.js
index 8149bc8e..b7d7bcdf 100644
--- a/modules/ui/options.js
+++ b/modules/ui/options.js
@@ -178,7 +178,7 @@ function mapSizeInputChange() {
}
}
-// change svg size on manual size change or window resize, do not change graph size
+// change svg size on manual size change or window resize (do not change graph size!)
function changeMapSize() {
svgWidth = Math.min(+mapWidthInput.value, window.innerWidth);
svgHeight = Math.min(+mapHeightInput.value, window.innerHeight);
@@ -190,12 +190,12 @@ function changeMapSize() {
[0, 0],
[maxWidth, maxHeight]
]);
+
landmass.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
oceanPattern.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
oceanLayers.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
fogging.selectAll("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
defs.select("mask#fog > rect").attr("width", maxWidth).attr("height", maxHeight);
- texture.select("image").attr("width", maxWidth).attr("height", maxHeight);
fitScaleBar();
if (window.fitLegendBox) fitLegendBox();
diff --git a/modules/ui/style.js b/modules/ui/style.js
index 90fa7bbd..f9e0189e 100644
--- a/modules/ui/style.js
+++ b/modules/ui/style.js
@@ -71,36 +71,36 @@ function getColorScheme(scheme = "bright") {
// Toggle style sections on element select
styleElementSelect.addEventListener("change", selectStyleElement);
function selectStyleElement() {
- const sel = styleElementSelect.value;
- let el = d3.select("#" + sel);
+ const styleElement = styleElementSelect.value;
+ let el = d3.select("#" + styleElement);
styleElements.querySelectorAll("tbody").forEach(e => (e.style.display = "none")); // hide all sections
// show alert line if layer is not visible
- const isLayerOff = sel !== "ocean" && (el.style("display") === "none" || !el.selectAll("*").size());
+ const isLayerOff = styleElement !== "ocean" && (el.style("display") === "none" || !el.selectAll("*").size());
styleIsOff.style.display = isLayerOff ? "block" : "none";
// active group element
const group = styleGroupSelect.value;
- if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders"].includes(sel)) {
+ if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders"].includes(styleElement)) {
const gEl = group && el.select("#" + group);
el = group && gEl.size() ? gEl : el.select("g");
}
// opacity
- if (!["landmass", "ocean", "regions", "legend"].includes(sel)) {
+ if (!["landmass", "ocean", "regions", "legend"].includes(styleElement)) {
styleOpacity.style.display = "block";
styleOpacityInput.value = styleOpacityOutput.value = el.attr("opacity") || 1;
}
// filter
- if (!["landmass", "legend", "regions"].includes(sel)) {
+ if (!["landmass", "legend", "regions"].includes(styleElement)) {
styleFilter.style.display = "block";
styleFilterInput.value = el.attr("filter") || "";
}
// fill
- if (["rivers", "lakes", "landmass", "prec", "ice", "fogging"].includes(sel)) {
+ if (["rivers", "lakes", "landmass", "prec", "ice", "fogging"].includes(styleElement)) {
styleFill.style.display = "block";
styleFillInput.value = styleFillOutput.value = el.attr("fill");
}
@@ -122,7 +122,7 @@ function selectStyleElement() {
"coordinates",
"zones",
"gridOverlay"
- ].includes(sel)
+ ].includes(styleElement)
) {
styleStroke.style.display = "block";
styleStrokeInput.value = styleStrokeOutput.value = el.attr("stroke");
@@ -132,7 +132,9 @@ function selectStyleElement() {
// stroke dash
if (
- ["routes", "borders", "temperature", "legend", "population", "coordinates", "zones", "gridOverlay"].includes(sel)
+ ["routes", "borders", "temperature", "legend", "population", "coordinates", "zones", "gridOverlay"].includes(
+ styleElement
+ )
) {
styleStrokeDash.style.display = "block";
styleStrokeDasharrayInput.value = el.attr("stroke-dasharray") || "";
@@ -152,16 +154,21 @@ function selectStyleElement() {
"texture",
"biomes",
"zones"
- ].includes(sel)
+ ].includes(styleElement)
) {
styleClipping.style.display = "block";
styleClippingInput.value = el.attr("mask") || "";
}
// show specific sections
- if (sel === "texture") styleTexture.style.display = "block";
+ if (styleElement === "texture") {
+ styleTexture.style.display = "block";
+ styleTextureShiftX.value = el.attr("data-x") || 0;
+ styleTextureShiftY.value = el.attr("data-y") || 0;
+ updateTextureSelectValue(el.attr("data-href"));
+ }
- if (sel === "terrs") {
+ if (styleElement === "terrs") {
styleHeightmap.style.display = "block";
styleHeightmapScheme.value = terrs.attr("scheme");
styleHeightmapTerracingInput.value = styleHeightmapTerracingOutput.value = terrs.attr("terracing");
@@ -170,12 +177,12 @@ function selectStyleElement() {
styleHeightmapCurve.value = terrs.attr("curve");
}
- if (sel === "markers") {
+ if (styleElement === "markers") {
styleMarkers.style.display = "block";
styleRescaleMarkers.checked = +markers.attr("rescale");
}
- if (sel === "gridOverlay") {
+ if (styleElement === "gridOverlay") {
styleGrid.style.display = "block";
styleGridType.value = el.attr("type");
styleGridScale.value = el.attr("scale") || 1;
@@ -184,7 +191,7 @@ function selectStyleElement() {
calculateFriendlyGridSize();
}
- if (sel === "compass") {
+ if (styleElement === "compass") {
styleCompass.style.display = "block";
const tr = parseTransform(compass.select("use").attr("transform"));
styleCompassShiftX.value = tr[0];
@@ -192,14 +199,14 @@ function selectStyleElement() {
styleCompassSizeInput.value = styleCompassSizeOutput.value = tr[2];
}
- if (sel === "terrain") {
+ if (styleElement === "terrain") {
styleRelief.style.display = "block";
styleReliefSizeOutput.innerHTML = styleReliefSizeInput.value = terrain.attr("size");
styleReliefDensityOutput.innerHTML = styleReliefDensityInput.value = terrain.attr("density");
styleReliefSet.value = terrain.attr("set");
}
- if (sel === "population") {
+ if (styleElement === "population") {
stylePopulation.style.display = "block";
stylePopulationRuralStrokeInput.value = stylePopulationRuralStrokeOutput.value = population
.select("#rural")
@@ -211,7 +218,7 @@ function selectStyleElement() {
styleStrokeWidthInput.value = styleStrokeWidthOutput.value = el.attr("stroke-width") || "";
}
- if (sel === "regions") {
+ if (styleElement === "regions") {
styleStates.style.display = "block";
styleStatesBodyOpacity.value = styleStatesBodyOpacityOutput.value = statesBody.attr("opacity") || 1;
styleStatesBodyFilter.value = statesBody.attr("filter") || "";
@@ -221,7 +228,7 @@ function selectStyleElement() {
styleStatesHaloBlur.value = styleStatesHaloBlurOutput.value = blur;
}
- if (sel === "labels") {
+ if (styleElement === "labels") {
styleFill.style.display = "block";
styleStroke.style.display = "block";
styleStrokeWidth.style.display = "block";
@@ -239,7 +246,7 @@ function selectStyleElement() {
styleFontSize.value = el.attr("data-size");
}
- if (sel === "provs") {
+ if (styleElement === "provs") {
styleFill.style.display = "block";
styleSize.style.display = "block";
styleFillInput.value = styleFillOutput.value = el.attr("fill") || "#111111";
@@ -249,7 +256,7 @@ function selectStyleElement() {
styleFontSize.value = el.attr("data-size");
}
- if (sel == "burgIcons") {
+ if (styleElement == "burgIcons") {
styleFill.style.display = "block";
styleStroke.style.display = "block";
styleStrokeWidth.style.display = "block";
@@ -263,7 +270,7 @@ function selectStyleElement() {
styleRadiusInput.value = el.attr("size") || 1;
}
- if (sel == "anchors") {
+ if (styleElement == "anchors") {
styleFill.style.display = "block";
styleStroke.style.display = "block";
styleStrokeWidth.style.display = "block";
@@ -274,7 +281,7 @@ function selectStyleElement() {
styleIconSizeInput.value = el.attr("size") || 2;
}
- if (sel === "legend") {
+ if (styleElement === "legend") {
styleStroke.style.display = "block";
styleStrokeWidth.style.display = "block";
styleSize.style.display = "block";
@@ -292,7 +299,7 @@ function selectStyleElement() {
styleFontSize.value = el.attr("data-size");
}
- if (sel === "ocean") {
+ if (styleElement === "ocean") {
styleOcean.style.display = "block";
styleOceanFill.value = styleOceanFillOutput.value = oceanLayers.select("#oceanBase").attr("fill");
styleOceanPattern.value = byId("oceanicPattern")?.getAttribute("href");
@@ -301,7 +308,7 @@ function selectStyleElement() {
outlineLayers.value = oceanLayers.attr("layers");
}
- if (sel === "temperature") {
+ if (styleElement === "temperature") {
styleStrokeWidth.style.display = "block";
styleTemperature.style.display = "block";
styleStrokeWidthInput.value = styleStrokeWidthOutput.value = el.attr("stroke-width") || "";
@@ -310,18 +317,18 @@ function selectStyleElement() {
styleTemperatureFontSizeInput.value = styleTemperatureFontSizeOutput.value = el.attr("font-size") || "8px";
}
- if (sel === "coordinates") {
+ if (styleElement === "coordinates") {
styleSize.style.display = "block";
styleFontSize.value = el.attr("data-size");
}
- if (sel === "armies") {
+ if (styleElement === "armies") {
styleArmies.style.display = "block";
styleArmiesFillOpacity.value = styleArmiesFillOpacityOutput.value = el.attr("fill-opacity");
styleArmiesSize.value = styleArmiesSizeOutput.value = el.attr("box-size");
}
- if (sel === "emblems") {
+ if (styleElement === "emblems") {
styleEmblems.style.display = "block";
styleStrokeWidth.style.display = "block";
styleStrokeWidthInput.value = styleStrokeWidthOutput.value = el.attr("stroke-width") || 1;
@@ -329,8 +336,8 @@ function selectStyleElement() {
// update group options
styleGroupSelect.options.length = 0; // remove all options
- if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders"].includes(sel)) {
- const groups = byId(sel).querySelectorAll("g");
+ if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders"].includes(styleElement)) {
+ const groups = byId(styleElement).querySelectorAll("g");
groups.forEach(el => {
if (el.id === "burgLabels") return;
const option = new Option(`${el.id} (${el.childElementCount})`, el.id, false, false);
@@ -339,11 +346,11 @@ function selectStyleElement() {
styleGroupSelect.value = el.attr("id");
styleGroup.style.display = "block";
} else {
- styleGroupSelect.options.add(new Option(sel, sel, false, true));
+ styleGroupSelect.options.add(new Option(styleElement, styleElement, false, true));
styleGroup.style.display = "none";
}
- if (sel === "coastline" && styleGroupSelect.value === "sea_island") {
+ if (styleElement === "coastline" && styleGroupSelect.value === "sea_island") {
styleCoastline.style.display = "block";
const auto = (styleCoastlineAuto.checked = coastline.select("#sea_island").attr("auto-filter"));
if (auto) styleFilter.style.display = "none";
@@ -398,12 +405,26 @@ styleFilterInput.addEventListener("change", function () {
});
styleTextureInput.addEventListener("change", function () {
- texture.select("image").attr("src", this.value);
- if (layerIsOn("toggleTexture")) texture.select("image").attr("href", this.value);
- zoom.scaleBy(svg, 1.00001);
+ changeTexture(this.value);
});
+function changeTexture(href) {
+ texture.attr("data-href", href);
+ texture.select("image").attr("href", href);
+}
+
+function updateTextureSelectValue(href) {
+ const isAdded = Array.from(styleTextureInput.options).some(option => option.value === href);
+ if (isAdded) {
+ styleTextureInput.value = href;
+ } else {
+ const name = href.split("/").pop().slice(0, 20);
+ styleTextureInput.add(new Option(name, href, false, true));
+ }
+}
+
styleTextureShiftX.addEventListener("input", function () {
+ texture.attr("data-x", this.value);
texture
.select("image")
.attr("x", this.value)
@@ -411,6 +432,7 @@ styleTextureShiftX.addEventListener("input", function () {
});
styleTextureShiftY.addEventListener("input", function () {
+ texture.attr("data-y", this.value);
texture
.select("image")
.attr("y", this.value)
@@ -905,27 +927,19 @@ emblemsBurgSizeInput.addEventListener("change", drawEmblems);
// request a URL to image to be used as a texture
function textureProvideURL() {
- alertMessage.innerHTML = /* html */ `Provide an image URL to be used as a texture:
+ alertMessage.innerHTML = /* html */ `Provide a texture image URL:
`;
+
$("#alert").dialog({
resizable: false,
title: "Load custom texture",
- width: "26em",
+ width: "28em",
buttons: {
Apply: function () {
- const name = textureURL.value.split("/").pop();
- if (!name || name === "") return tip("Please provide a valid URL", false, "error");
-
- const opt = document.createElement("option");
- opt.value = textureURL.value;
- opt.text = name.slice(0, 20);
- styleTextureInput.add(opt);
- styleTextureInput.value = textureURL.value;
-
- const image = texture.select("image");
- image.attr("src", textureURL.value);
- if (layerIsOn("toggleTexture")) image.attr("href", textureURL.value);
+ if (!textureURL.value) return tip("Please provide a valid URL", false, "error");
+ changeTexture(textureURL.value);
+ updateTextureSelectValue(textureURL.value);
$(this).dialog("close");
},
Cancel: function () {
diff --git a/modules/ui/stylePresets.js b/modules/ui/stylePresets.js
index c4a01dee..a0780283 100644
--- a/modules/ui/stylePresets.js
+++ b/modules/ui/stylePresets.js
@@ -77,6 +77,7 @@ function applyStyle(style) {
for (const selector in style) {
const el = document.querySelector(selector);
if (!el) continue;
+
for (const attribute in style[selector]) {
const value = style[selector][attribute];
@@ -91,8 +92,13 @@ function applyStyle(style) {
el.setAttribute(attribute, value);
}
- if (layerIsOn("toggleTexture") && selector === "#textureImage" && attribute === "src") {
- el.setAttribute("href", value);
+ if (selector === "#texture") {
+ const image = document.querySelector("#texture > image");
+ if (image) {
+ if (attribute === "data-x") image.setAttribute("x", value);
+ if (attribute === "data-y") image.setAttribute("y", value);
+ if (attribute === "data-href") image.setAttribute("href", value);
+ }
}
// add custom heightmap color scheme
@@ -105,10 +111,7 @@ function applyStyle(style) {
function requestStylePresetChange(preset) {
const isConfirmed = sessionStorage.getItem("styleChangeConfirmed");
- if (isConfirmed) {
- changeStyle(preset);
- return;
- }
+ if (isConfirmed) return changeStyle(preset);
confirmationDialog({
title: "Change style preset",
@@ -126,8 +129,8 @@ function requestStylePresetChange(preset) {
async function changeStyle(desiredPreset) {
const styleData = await getStylePreset(desiredPreset);
- const [appliedPreset, style] = styleData;
- localStorage.setItem("presetStyle", appliedPreset);
+ const [presetName, style] = styleData;
+ localStorage.setItem("presetStyle", presetName);
applyStyleWithUiRefresh(style);
}
@@ -234,8 +237,7 @@ function addStylePreset() {
],
"#ice": ["opacity", "fill", "stroke", "stroke-width", "filter"],
"#emblems": ["opacity", "stroke-width", "filter"],
- "#texture": ["opacity", "filter", "mask"],
- "#textureImage": ["x", "y", "src"],
+ "#texture": ["opacity", "filter", "mask", "data-x", "data-y", "data-href"],
"#zones": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"],
"#oceanLayers": ["filter", "layers"],
"#oceanBase": ["fill"],
diff --git a/styles/ancient.json b/styles/ancient.json
index 6bacb0d5..561ee677 100644
--- a/styles/ancient.json
+++ b/styles/ancient.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.6,
"filter": "",
- "mask": ""
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/antique-small.jpg"
+ "mask": "",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/antique-small.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/atlas.json b/styles/atlas.json
index 72a31027..7844a758 100644
--- a/styles/atlas.json
+++ b/styles/atlas.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.2,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/clean.json b/styles/clean.json
index a65beffb..eff28924 100644
--- a/styles/clean.json
+++ b/styles/clean.json
@@ -263,12 +263,10 @@
"#texture": {
"opacity": 0.2,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#zones": {
"opacity": 0.7,
diff --git a/styles/cyberpunk.json b/styles/cyberpunk.json
index 02b815e3..bf7416c6 100644
--- a/styles/cyberpunk.json
+++ b/styles/cyberpunk.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.2,
"filter": null,
- "mask": "url(#water)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/mercury-small.jpg"
+ "mask": "url(#water)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/mercury-small.jpg"
},
"#zones": {
"opacity": 0.7,
diff --git a/styles/default.json b/styles/default.json
index 40ba8230..fda0718e 100644
--- a/styles/default.json
+++ b/styles/default.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": null,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/marble-big.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/marble-big.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/gloom.json b/styles/gloom.json
index 6a4c6cb3..769eefbb 100644
--- a/styles/gloom.json
+++ b/styles/gloom.json
@@ -263,12 +263,10 @@
"#texture": {
"opacity": 0.8,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/iran-small.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/iran-small.jpg"
},
"#zones": {
"opacity": 0.5,
diff --git a/styles/light.json b/styles/light.json
index 358f3315..db6ca412 100644
--- a/styles/light.json
+++ b/styles/light.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.4,
"filter": null,
- "mask": ""
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/monochrome.json b/styles/monochrome.json
index a4273144..19710a2c 100644
--- a/styles/monochrome.json
+++ b/styles/monochrome.json
@@ -251,12 +251,10 @@
"#texture": {
"opacity": 0.2,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#emblems": {
"opacity": 0.5,
diff --git a/styles/night.json b/styles/night.json
index d97f7ccd..a3c086c9 100644
--- a/styles/night.json
+++ b/styles/night.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.1,
"filter": null,
- "mask": "url(#water)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/marble-blue-small.jpg"
+ "mask": "url(#water)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2019/07/marble-blue-small.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/pale.json b/styles/pale.json
index a0c444e1..fec30da2 100644
--- a/styles/pale.json
+++ b/styles/pale.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.4,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/styles/watercolor.json b/styles/watercolor.json
index b0bda134..358c99ca 100644
--- a/styles/watercolor.json
+++ b/styles/watercolor.json
@@ -261,12 +261,10 @@
"#texture": {
"opacity": 0.2,
"filter": null,
- "mask": "url(#land)"
- },
- "#textureImage": {
- "x": 0,
- "y": 0,
- "src": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
+ "mask": "url(#land)",
+ "data-x": 0,
+ "data-y": 0,
+ "data-href": "https://i2.wp.com/azgaar.files.wordpress.com/2021/10/plaster.jpg"
},
"#zones": {
"opacity": 0.6,
diff --git a/versioning.js b/versioning.js
index ec17f078..7ab7933a 100644
--- a/versioning.js
+++ b/versioning.js
@@ -1,7 +1,7 @@
"use strict";
// version and caching control
-const version = "1.93.12"; // generator version, update each time
+const version = "1.94.00"; // generator version, update each time
{
document.title += " v" + version;