Loading src/utils.js +5 −8 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ export const capitalizeFirstLetter = (string) => { return string.charAt(0).toUpperCase() + string.slice(1); }; export const propsBinder = (methods, leafletElement, props, setOptions) => { export const propsBinder = (methods, leafletElement, props) => { for (const key in props) { const setMethodName = "set" + capitalizeFirstLetter(key); if (methods[setMethodName]) { Loading @@ -32,13 +32,6 @@ export const propsBinder = (methods, leafletElement, props, setOptions) => { methods[setMethodName](newVal, oldVal); } ); } else if (setMethodName === "setOptions") { watch( () => props[key], (newVal) => { setOptions(leafletElement, newVal); } ); } else if (leafletElement[setMethodName]) { watch( () => props[key], Loading Loading @@ -103,3 +96,7 @@ export const provideLeafletWrapper = (methodName) => { */ export const updateLeafletWrapper = (wrapper, leafletMethod) => (wrapper.wrapped.value = leafletMethod); export const optionsMerger = (options, props) => { return { ...options, ...props.options, options: undefined }; }; Loading
src/utils.js +5 −8 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ export const capitalizeFirstLetter = (string) => { return string.charAt(0).toUpperCase() + string.slice(1); }; export const propsBinder = (methods, leafletElement, props, setOptions) => { export const propsBinder = (methods, leafletElement, props) => { for (const key in props) { const setMethodName = "set" + capitalizeFirstLetter(key); if (methods[setMethodName]) { Loading @@ -32,13 +32,6 @@ export const propsBinder = (methods, leafletElement, props, setOptions) => { methods[setMethodName](newVal, oldVal); } ); } else if (setMethodName === "setOptions") { watch( () => props[key], (newVal) => { setOptions(leafletElement, newVal); } ); } else if (leafletElement[setMethodName]) { watch( () => props[key], Loading Loading @@ -103,3 +96,7 @@ export const provideLeafletWrapper = (methodName) => { */ export const updateLeafletWrapper = (wrapper, leafletMethod) => (wrapper.wrapped.value = leafletMethod); export const optionsMerger = (options, props) => { return { ...options, ...props.options, options: undefined }; };