Unverified Commit bb13f1bd authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera
Browse files

feat: add bindPopup and unbind fns

parent 6a10a16f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ export const setup = (props, leafletRef, context) => {
        }
      }
    },
    bindPopup({ leafletObject }) {
      leafletRef.value.bindPopup(leafletObject);
    },
    bindTooltip({ leafletObject }) {
      leafletRef.value.bindTooltip(leafletObject);
    },
@@ -85,8 +88,10 @@ export const setup = (props, leafletRef, context) => {
    },
  };

  provide("bindPopup", methods.bindPopup);
  provide("bindTooltip", methods.bindTooltip);
  provide("unbindTooltip", methods.unbindTooltip);
  provide("unbindPopup", methods.unbindPopup);

  onUnmounted(() => {
    methods.unbindPopup();