Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/vue2-leaflet.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue2-leaflet.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue2-leaflet.min.js.map

Large diffs are not rendered by default.

7,128 changes: 7,009 additions & 119 deletions examples/package-lock.json

Large diffs are not rendered by default.

3,857 changes: 1 addition & 3,856 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/components/LCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LCircleMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LFeatureGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LLayerGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
20 changes: 18 additions & 2 deletions src/components/LMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const props = {
default: true,
},
latLng: {
type: [Object, Array]
type: [Object, Array],
custom: true,
},
icon: {
custom: false,
Expand All @@ -42,7 +43,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down Expand Up @@ -85,6 +85,22 @@ export default {
this.parentContainer.removeLayer(this);
}
}
},
setLatLng(newVal, oldVal) {
if (newVal == oldVal) return;
if (this.mapObject) {
let oldLatLng = oldVal ? {
lat: oldVal[0] || oldVal.lat,
lng: oldVal[1] || oldVal.lng,
} : {};
let newLatLng = {
lat: newVal[0] || newVal.lat,
lng: newVal[1] || newVal.lng,
};
if (newLatLng.lat != oldLatLng.lat || newLatLng.lng != oldLatLng.lng) {
this.mapObject.setLatLng(newLatLng);
}
}
}
}
};
Expand Down
1 change: 0 additions & 1 deletion src/components/LPolygon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LPolyline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LRectangle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export default {
data() {
return {
ready: false,
parentMapObject: undefined
}
},
mounted() {
Expand Down
1 change: 0 additions & 1 deletion src/components/LTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default {
props: props,
data() {
return {
parentMapObject: undefined
}
},
mounted() {
Expand Down
3 changes: 3 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
exports.findRealParent = require('./utils/findRealParent').default;
exports.propsBinder = require('./utils/propsBinder').default;

exports.LCircle = require('./components/LCircle').default;
exports.LCircleMarker = require('./components/LCircleMarker').default;
exports.LControlAttribution = require('./components/LControlAttribution').default;
Expand Down