restore river cells of load

This commit is contained in:
Azgaar 2021-07-28 19:46:42 +03:00
parent 467c9c2a9b
commit a643f30cb0
4 changed files with 7 additions and 3 deletions

View file

@ -33,7 +33,7 @@ async function addFonts(url) {
function loadUsedFonts() {
const fontsInUse = getFontsList(svg);
const fontsToLoad = fontsInUse.filter(font => !fonts.includes(font));
if (fontsToLoad) {
if (fontsToLoad?.length) {
const url = "https://fonts.googleapis.com/css?family=" + fontsToLoad.join("|");
addFonts(url);
}

View file

@ -727,6 +727,10 @@ function parseLoadedData(data) {
river.cells = Array.from(riverCells);
}
pack.cells.i.forEach(i => {
if (pack.cells.r[i] && pack.cells.h[i] < 20) pack.cells.r[i] = 0;
});
}
}
})();