markers rework - optional pin shapes

This commit is contained in:
Azgaar 2021-09-19 02:13:40 +03:00
parent 3b47efd9a4
commit 1023bb0676
10 changed files with 52 additions and 23 deletions

View file

@ -275,7 +275,6 @@ async function getMapURL(type, options = {}) {
});
}
// TODO: add dataURL for all used fonts
const usedFonts = getUsedFonts(cloneEl);
const fontsToLoad = usedFonts.filter(font => font.src);
if (fontsToLoad.length) {
@ -305,7 +304,6 @@ async function getMapURL(type, options = {}) {
// remove hidden g elements and g elements without children to make downloaded svg smaller in size
function removeUnusedElements(clone) {
if (!terrain.selectAll("use").size()) clone.select("#defs-relief")?.remove();
if (markers.style("display") === "none") clone.select("#defs-markers")?.remove();
for (let empty = 1; empty; ) {
empty = 0;