From bf53458009440e145ed376bcc69f744e7931a85b Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 21 Apr 2019 23:17:28 +0300 Subject: [PATCH] v 0.8.02b --- modules/save-and-load.js | 3 ++- modules/ui/tools.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 6b0a2e72..6a3a1233 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -197,7 +197,8 @@ function uploadFile(file, callback) { const parsed = parseFloat(mapVersion); let message = "", load = false; if (isNaN(parsed) || data.length < 26 || !data[5]) { - message = `The file you are trying to load is not a valid .map file`; + message = `The file you are trying to load is outdated or not a valid .map file. +
Please try to open it using an ${archive}`; } else if (parsed < 0.7) { message = `The map version you are trying to load (${mapVersion}) is too old and cannot be updated to the current version.
Please keep using an ${archive}`; diff --git a/modules/ui/tools.js b/modules/ui/tools.js index 1ebed58d..0501b2b4 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -69,7 +69,13 @@ function addLabelOnClick() { const name = Names.getCulture(culture); const id = getNextId("label"); - labels.select("#addedLabels").append("text").attr("id", id) + let group = labels.select("#addedLabels"); + if (!group.size()) group = labels.append("g").attr("id", "addedLabels") + .attr("fill", "#3e3e4b").attr("opacity", 1).attr("stroke", "#3a3a3a") + .attr("stroke-width", 0).attr("font-family", "Almendra SC").attr("data-font", "Almendra+SC") + .attr("font-size", 18).attr("data-size", 18).attr("filter", null); + + group.append("text").attr("id", id) .append("textPath").attr("xlink:href", "#textPath_"+id).text(name) .attr("startOffset", "50%").attr("font-size", "100%");