Loading src/components/LTooltip.vue +4 −10 Original line number Diff line number Diff line Loading @@ -10,16 +10,10 @@ export default { name: "LTooltip", props, setup(props, context) { const leafletRef = ref({}); const root = ref(null); const lMethods = inject("leafLetMethods"); const { options, methods } = tooltipSetup( props, leafletRef, context, lMethods ); const leafletRef = ref({}); const { options, methods } = tooltipSetup(props, leafletRef); const bindTooltip = inject("bindTooltip"); onMounted(async () => { const { tooltip, DomEvent, setOptions } = await import( Loading @@ -32,7 +26,7 @@ export default { const listeners = remapEvents(context.attrs); DomEvent.on(leafletRef.value, listeners); leafletRef.value.setContent(props.content || root.value); lMethods.bindTooltip({ mapObject: leafletRef.value }); bindTooltip({ mapObject: leafletRef.value }); }); return { root }; }, Loading src/functions/layer.js +2 −4 Original line number Diff line number Diff line Loading @@ -85,10 +85,8 @@ export const setup = (props, leafletRef, context) => { }, }; provide("leafLetMethods", { bindTooltip: methods.bindTooltip, unbindTooltip: methods.unbindTooltip, }); provide("bindTooltip", methods.bindTooltip); provide("unbindTooltip", methods.unbindTooltip); onUnmounted(() => { methods.unbindPopup(); Loading src/functions/tooltip.js +4 −3 Original line number Diff line number Diff line import { onBeforeUnmount } from "vue"; import { inject, onBeforeUnmount } from "vue"; import { props as popperProps, setup as popperSetup } from "./popper"; export const props = { ...popperProps, }; export const setup = (props, leafletRef, context, lMethods) => { export const setup = (props, leafletRef) => { const { options, methods } = popperSetup(props, leafletRef); const unbindTooltip = inject("unbindTooltip"); onBeforeUnmount(() => { lMethods.unbindTooltip(); unbindTooltip(); }); return { options, methods }; Loading Loading
src/components/LTooltip.vue +4 −10 Original line number Diff line number Diff line Loading @@ -10,16 +10,10 @@ export default { name: "LTooltip", props, setup(props, context) { const leafletRef = ref({}); const root = ref(null); const lMethods = inject("leafLetMethods"); const { options, methods } = tooltipSetup( props, leafletRef, context, lMethods ); const leafletRef = ref({}); const { options, methods } = tooltipSetup(props, leafletRef); const bindTooltip = inject("bindTooltip"); onMounted(async () => { const { tooltip, DomEvent, setOptions } = await import( Loading @@ -32,7 +26,7 @@ export default { const listeners = remapEvents(context.attrs); DomEvent.on(leafletRef.value, listeners); leafletRef.value.setContent(props.content || root.value); lMethods.bindTooltip({ mapObject: leafletRef.value }); bindTooltip({ mapObject: leafletRef.value }); }); return { root }; }, Loading
src/functions/layer.js +2 −4 Original line number Diff line number Diff line Loading @@ -85,10 +85,8 @@ export const setup = (props, leafletRef, context) => { }, }; provide("leafLetMethods", { bindTooltip: methods.bindTooltip, unbindTooltip: methods.unbindTooltip, }); provide("bindTooltip", methods.bindTooltip); provide("unbindTooltip", methods.unbindTooltip); onUnmounted(() => { methods.unbindPopup(); Loading
src/functions/tooltip.js +4 −3 Original line number Diff line number Diff line import { onBeforeUnmount } from "vue"; import { inject, onBeforeUnmount } from "vue"; import { props as popperProps, setup as popperSetup } from "./popper"; export const props = { ...popperProps, }; export const setup = (props, leafletRef, context, lMethods) => { export const setup = (props, leafletRef) => { const { options, methods } = popperSetup(props, leafletRef); const unbindTooltip = inject("unbindTooltip"); onBeforeUnmount(() => { lMethods.unbindTooltip(); unbindTooltip(); }); return { options, methods }; Loading