Darakah / obsidian-map

Use leaflet to generate an interactive map with all geo / temporal tagged notes linked and displayed on the map
20 stars 2 forks source link

Block edit freeDraw option if Draw option not checked #7

Closed Darakah closed 3 years ago

Darakah commented 3 years ago

Fixed in Version 0.3.0

Cause of the error was that using the existence of freeDraw failed since even though the layer was detached the object still existed and thus the condition did not trigger.

if (!freeDraw) {
  return;
}

Replaced with:

if(!map.hasLayer(freeDraw)){
  return;
}