From 12e2600d3507e3b5c6ff7f7cb6809cf2df41313b Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 13 Dec 2020 21:02:32 +0300 Subject: [PATCH] v1.4.49 --- LICENSE | 4 ++-- modules/save-and-load.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 19e4e777..24402ab6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright 2018-2019 Max Ganiev (Azgaar), azgaar.fmg@yandex.by +Copyright 2018-2020 Max Ganiev (Azgaar), azgaar.fmg@yandex.by Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -You can produce, without restrictions, any derivative works from the original +You can produce, without restrictions, any derivative works from the original software and even reap commercial benefits from the sale of the secondary product. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 4cd42ad8..da44cf26 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -311,7 +311,7 @@ function saveGeoJSON_Cells() { const getHeight = i => parseInt(getFriendlyHeight([cells.p[i][0],cells.p[i][1]])); cells.i.forEach(i => { - const coordinates = getCellPoints(cells.v[i]); + const coordinates = getCellCoordinates(cells.v[i]); const height = getHeight(i); const biome = cells.biome[i]; const type = pack.features[cells.f[i]].type; @@ -389,10 +389,10 @@ function saveGeoJSON_Markers() { downloadFile(JSON.stringify(json), name, "application/json"); } -function getCellPoints(vertices) { +function getCellCoordinates(vertices) { const p = pack.vertices.p; - const points = vertices.map(n => getQGIScoordinates(p[n][0] / graphWidth, p[n][1] / graphHeight)); - return points.concat([points[0]]); + const coordinates = vertices.map(n => getQGIScoordinates(p[n][0], p[n][1])); + return coordinates.concat([coordinates[0]]); } function getRoutePoints(node) {