FIX: notes are not copied.

This commit is contained in:
Mészáros Gergely 2022-04-21 15:11:32 +02:00
parent e9b4a7b03a
commit 0c9d735f37
2 changed files with 4 additions and 2 deletions

View file

@ -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`);

View file

@ -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);