Skip to content

Commit

Permalink
FIX: notes are not copied.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mészáros Gergely committed Apr 21, 2022
1 parent e9b4a7b commit 0c9d735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions modules/submap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
4 changes: 2 additions & 2 deletions modules/ui/submap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0c9d735

Please sign in to comment.