Loading src/components/LIcon.vue +5 −16 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import { remapEvents, WINDOW_OR_GLOBAL, GLOBAL_LEAFLET_OPT, propsToLeafletOptions, } from "../utils"; import { iconProps } from "../functions/icon"; import { componentProps, setupComponent } from "../functions/component"; Loading Loading @@ -47,22 +48,10 @@ export default { } const { options: componentOptions } = setupComponent(props); const options = { ...componentOptions, iconUrl: props.iconUrl, iconRetinaUrl: props.iconRetinaUrl, iconSize: props.iconSize, iconAnchor: props.iconAnchor, popupAnchor: props.popupAnchor, tooltipAnchor: props.tooltipAnchor, shadowUrl: props.shadowUrl, shadowRetinaUrl: props.shadowRetinaUrl, shadowSize: props.shadowSize, shadowAnchor: props.shadowAnchor, bgPos: props.bgPos, className: props.className, html: elHtml || props.html, }; const options = propsToLeafletOptions(props, iconProps, componentOptions); if (elHtml) { options.html = elHtml; } iconObject = options.html ? divIcon(options) : icon(options); onDomEvent(iconObject, listeners); Loading src/components/LTileLayer.vue +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ export default { const { tileLayer, DomEvent } = useGlobalLeaflet ? WINDOW_OR_GLOBAL.L : await import("leaflet/dist/leaflet-src.esm"); leafletRef.value = tileLayer(props.url, options); const listeners = remapEvents(context.attrs); Loading src/functions/circle.js +6 −4 Original line number Diff line number Diff line import { propsToLeafletOptions } from "../utils"; import { circleMarkerProps, setupCircleMarker } from "./circleMarker"; export const circleProps = { Loading @@ -16,10 +17,11 @@ export const setupCircle = (props, leafletRef, context) => { methods: circleMarkerMethods, } = setupCircleMarker(props, leafletRef, context); const options = { ...circleMarkerOptions, ...props, }; const options = propsToLeafletOptions( props, circleProps, circleMarkerOptions ); const methods = { ...circleMarkerMethods, Loading src/functions/circleMarker.js +4 −4 Original line number Diff line number Diff line import { propsToLeafletOptions } from "../utils"; import { pathProps as pathProps, setupPath as pathSetup } from "./path"; export const circleMarkerProps = { Loading @@ -21,10 +22,9 @@ export const setupCircleMarker = (props, leafletRef, context) => { leafletRef, context ); const options = { ...pathOptions, ...props, }; const options = propsToLeafletOptions(props, circleMarkerProps, pathOptions); const methods = { ...pathMethods, setRadius(radius) { Loading src/functions/control.js +4 −4 Original line number Diff line number Diff line import { onUnmounted, h } from "vue"; import { propsToLeafletOptions } from "../utils"; import { componentProps, setupComponent } from "./component"; export const controlProps = { Loading @@ -13,10 +14,8 @@ export const setupControl = (props, leafletRef) => { options: componentOptions, methods: componentMethods, } = setupComponent(props); const options = { ...componentOptions, position: props.position, }; const options = propsToLeafletOptions(props, controlProps, componentOptions); const methods = { ...componentMethods, Loading @@ -40,5 +39,6 @@ export const render = (slots) => { if (slots.default) { return h("div", { ref: "root" }, slots.default()); } return null; }; Loading
src/components/LIcon.vue +5 −16 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import { remapEvents, WINDOW_OR_GLOBAL, GLOBAL_LEAFLET_OPT, propsToLeafletOptions, } from "../utils"; import { iconProps } from "../functions/icon"; import { componentProps, setupComponent } from "../functions/component"; Loading Loading @@ -47,22 +48,10 @@ export default { } const { options: componentOptions } = setupComponent(props); const options = { ...componentOptions, iconUrl: props.iconUrl, iconRetinaUrl: props.iconRetinaUrl, iconSize: props.iconSize, iconAnchor: props.iconAnchor, popupAnchor: props.popupAnchor, tooltipAnchor: props.tooltipAnchor, shadowUrl: props.shadowUrl, shadowRetinaUrl: props.shadowRetinaUrl, shadowSize: props.shadowSize, shadowAnchor: props.shadowAnchor, bgPos: props.bgPos, className: props.className, html: elHtml || props.html, }; const options = propsToLeafletOptions(props, iconProps, componentOptions); if (elHtml) { options.html = elHtml; } iconObject = options.html ? divIcon(options) : icon(options); onDomEvent(iconObject, listeners); Loading
src/components/LTileLayer.vue +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ export default { const { tileLayer, DomEvent } = useGlobalLeaflet ? WINDOW_OR_GLOBAL.L : await import("leaflet/dist/leaflet-src.esm"); leafletRef.value = tileLayer(props.url, options); const listeners = remapEvents(context.attrs); Loading
src/functions/circle.js +6 −4 Original line number Diff line number Diff line import { propsToLeafletOptions } from "../utils"; import { circleMarkerProps, setupCircleMarker } from "./circleMarker"; export const circleProps = { Loading @@ -16,10 +17,11 @@ export const setupCircle = (props, leafletRef, context) => { methods: circleMarkerMethods, } = setupCircleMarker(props, leafletRef, context); const options = { ...circleMarkerOptions, ...props, }; const options = propsToLeafletOptions( props, circleProps, circleMarkerOptions ); const methods = { ...circleMarkerMethods, Loading
src/functions/circleMarker.js +4 −4 Original line number Diff line number Diff line import { propsToLeafletOptions } from "../utils"; import { pathProps as pathProps, setupPath as pathSetup } from "./path"; export const circleMarkerProps = { Loading @@ -21,10 +22,9 @@ export const setupCircleMarker = (props, leafletRef, context) => { leafletRef, context ); const options = { ...pathOptions, ...props, }; const options = propsToLeafletOptions(props, circleMarkerProps, pathOptions); const methods = { ...pathMethods, setRadius(radius) { Loading
src/functions/control.js +4 −4 Original line number Diff line number Diff line import { onUnmounted, h } from "vue"; import { propsToLeafletOptions } from "../utils"; import { componentProps, setupComponent } from "./component"; export const controlProps = { Loading @@ -13,10 +14,8 @@ export const setupControl = (props, leafletRef) => { options: componentOptions, methods: componentMethods, } = setupComponent(props); const options = { ...componentOptions, position: props.position, }; const options = propsToLeafletOptions(props, controlProps, componentOptions); const methods = { ...componentMethods, Loading @@ -40,5 +39,6 @@ export const render = (slots) => { if (slots.default) { return h("div", { ref: "root" }, slots.default()); } return null; };