From 0c9d735f374f3c169bcf846848f195800c78c1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Gergely?= Date: Thu, 21 Apr 2022 15:11:32 +0200 Subject: [PATCH] FIX: notes are not copied. --- modules/submap.js | 2 ++ modules/ui/submap.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/submap.js b/modules/submap.js index 92d30865..6c1611fe 100644 --- a/modules/submap.js +++ b/modules/submap.js @@ -315,6 +315,8 @@ window.Submap = (function () { stage("Regenerating Zones."); addZones(); Names.getMapName(); + stage("Restoring Notes."); + notes = parentMap.notes; stage("Submap done."); WARN && console.warn(`TOTAL: ${rn((performance.now() - timeStart) / 1000, 2)}s`); diff --git a/modules/ui/submap.js b/modules/ui/submap.js index 15906e52..e08665ef 100644 --- a/modules/ui/submap.js +++ b/modules/ui/submap.js @@ -141,16 +141,16 @@ window.UISubmap = (function () { async function startResample(options) { // Do model changes with Submap.resample then do view changes if needed. - undraw(); resetZoom(0); let oldstate = { grid: deepCopy(grid), pack: deepCopy(pack), + notes: deepCopy(notes), seed, graphWidth, graphHeight }; - + undraw(); try { const oldScale = scale; await Submap.resample(oldstate, options);