Skip to content

Commit

Permalink
Merge pull request #377 from KoRiGaN/feature/ready-event
Browse files Browse the repository at this point in the history
Feature/ready event
  • Loading branch information
Nicolò Maria Mezzopera authored Apr 21, 2019
2 parents 8dda7ce + 20177ff commit 1f85fdd
Show file tree
Hide file tree
Showing 47 changed files with 50 additions and 61 deletions.
1 change: 0 additions & 1 deletion docs/components/events-notice.md

This file was deleted.

4 changes: 1 addition & 3 deletions docs/components/l-circle-marker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ export default {

## Events

`l-circle-marker` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-circle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export default {

## Events

`l-circle` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-control-attribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ export default {

## Events

`l-control-attribution` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-control-layers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ export default {

## Events

`l-control-layers` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-control-scale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export default {

## Events

`l-control-scale` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-control-zoom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ export default {

## Events

`l-control-zoom` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ export default {

## Events

`l-control` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')


## Extends
Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-feature-group/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export default {

## Events

`l-feature-group` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-geo-json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ export default {

## Events

`l-geo-json` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
3 changes: 1 addition & 2 deletions docs/components/l-grid-layer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ export default {

## Events

`l-grid-layer` does emit any event on his own.
Leaflet's `tileunload` event is internally used to trigger the destruction
of the tile components when a tile leaves the visible area.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-icon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,4 @@ export default {

## Events

`l-icon` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')
4 changes: 1 addition & 3 deletions docs/components/l-image-overlay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ export default {

## Events

`l-image-overlay` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 2 additions & 2 deletions docs/components/l-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ export default {

## Events

* **leaflet:load** - emitted when the leaflet map instance is ready
* **leaflet:load** - emitted when the leaflet map instance is ready **This Event is deprecated in favour of `ready`**
* **update:zoom** - emitted when the zoom of the map changes - `update:zoom` is emitted together with a `Number` value representing the current `zoom`
* **update:center** - emitted when the center of the map changes - `update:center` is emitted together with an instance of `L.LatLng` value representing the current `center` [L.latLng](https://leafletjs.com/reference-1.3.0.html#latlng)
* **update:bounds** - emitted when the bounds of the map changes - `update:bounds` is emitted together with an instance of `L.latLngBounds` value representing the current `bound` [L.latLngBounds](https://leafletjs.com/reference-1.3.0.html#latlngbounds)

!> **update:zoom**, **update:center**, **update:bounds** are all debounced events based on `leaflet` `moveend` event and support `sync` modifier

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
2 changes: 1 addition & 1 deletion docs/components/l-marker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {

!> **update:latlng** support `sync` modifier

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-polygon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export default {

## Events

`l-polygon` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-polyline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export default {

## Events

`l-polyline` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-popup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export default {

## Events

`l-popup` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-rectangle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export default {

## Events

`l-rectangle` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-tile-layer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ export default {

## Events

`l-tile-layer` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-tooltip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export default {

## Events

`l-tooltip` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
4 changes: 1 addition & 3 deletions docs/components/l-wms-tile-layer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export default {

## Events

`l-wms-tile-layer` does not emit any event on his own.

[filename](../events-notice.md ':include')
[filename](../shared-events.md ':include')

## Extends

Expand Down
3 changes: 3 additions & 0 deletions docs/components/shared-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* **ready** - emitted when the component is ready, - `ready` is emitted togheter with the `mapObject` dictionary that contains the underlying `leaflet` instance

All native leaflet events are passed through, e.g. `@leafletevent="..."`.
2 changes: 1 addition & 1 deletion examples/src/components/LoadTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<img
width="300"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAACLlBMVEVMaXFBuINBuIM8enI/nnxBuINBuINBuIM8enJBuIM8enJBuINBuINBuIM8enJBuIM8enJBuINBuIM7eXFBuINBuIM8eXFBuINBuIM8eHFBuIM8eXFBuIM8eHBBuIM8eHBBuIM8d3BBuINBuIM8d3BBuINBuINBuIM8dnBBuINBuIM8dnBBuINBuIM7dXBBuINBuIM8dG9BuINBuIM8dG9BuIM8dG9BuINBuIM8c29BuINBuIM7cm5BuINBuIM7cW5BuIM7cW9BuINBuINBuIM7cW5BuINBuINBuIM7b21BuINBuIM6b21BuIM7bm1BuINBuIM7bW1BuINBuIM6bGxBuIN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Yj33F8DAf+yrhYRj2de/m7mmciIf52FcND/Oxrxge5mNfDTwMw77umnt3WxcP87GvGB7mY181PMzHvkp4mI99BfCwn/bu6UoSAACi6CqPtW2NbZtxdnaTRON93JdGnVMX9tXCw2BfMTwM9tXCw2BfLTwM9hXDw2BfLTwM9hXDw2BfUTwM9pVec+22Q+jVYAjFsC94WAv7gofFsC94WAv7gofFsC94WAD7cjfnNK6Ch8G+WngY7CuGh8G+WngY7CuJh/WxL3gY7GvYXQyGUAD7gofBvgJ4GOyrhof1sS94GOxr2D0aAh4WwL7gYbCvBh7Wx77gYbCvYbcwGEIB7AseFsC+4GGwr8Caa7dt4GGwrxYeBvuK4WGwrxYeBvuK4WGwrxYeBvtq4WGwrxgeBvuq4WGwr8DdnNO4Kh4G+4rhYbCvFh4G+2rhYbCvHh7Wx77gYX3sCx7Wx77gYbCvYXcL+6rhYS3sS5uwrzAeFsC+9K+Gfbmba53G6W0M+9IJ7KuGh7WwL63UsC9rbmu31XfYVw0Pa2FfehbDvrRXw77gYS3sSzM17Ase1sK+9DGGfem6hn3Bw1rYlzZq2Bc8rIV96U8Y+7Lm2m0DvYphXzquYV/wsBb2paUa9gUPa2Ff+hbGvtzNOY0L9AT2FWsX9hXGw2BfgaZhX2E8DPYV6APsK9YF7CuMh8G+Aq3BvsJ4GOwr0G/YVxgPg30Fegn7inUI+wrjYbCvQAuwrzAeBvsK9AX21V9z7bYZPAz2FWgb9hXGw2Bfgf7DvsJ4GOwr0DvYV6wz2FcXD4N9FVqFfVXv5pzGNfrZxL7gYbCvSs9hX7EOetgXPAz2VWquhn3Bw2BfrT7DviRJkiRJkiRJkiRJkiRJkiQNszucKAuToL+DiQAAAABJRU5ErkJggg=="
/>
>
</l-popup>
</l-marker>
</l-map>
Expand Down
1 change: 1 addition & 0 deletions src/components/LCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default {
this.ready = true;
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
},
methods: {}
};
Expand Down
1 change: 1 addition & 0 deletions src/components/LCircleMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default {
this.ready = true;
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
}
};
</script>
1 change: 1 addition & 0 deletions src/components/LControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
this.parentContainer = findRealParent(this.$parent);
this.mapObject.setElement(this.$el);
this.mapObject.addTo(this.parentContainer.mapObject);
this.$emit('ready', this.mapObject);
}
};
</script>
1 change: 1 addition & 0 deletions src/components/LControlAttribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
this.mapObject = control.attribution(options);
propsBinder(this, this.mapObject, this.$options.props);
this.mapObject.addTo(this.$parent.mapObject);
this.$emit('ready', this.mapObject);
},
render () {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/components/LControlLayers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default {
this.mapObject = control.layers(null, null, options);
propsBinder(this, this.mapObject, this.$options.props);
this.$parent.registerLayerControl(this);
this.$emit('ready', this.mapObject);
},
methods: {
addLayer (layer) {
Expand Down
1 change: 1 addition & 0 deletions src/components/LControlScale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
this.mapObject = control.scale(options);
propsBinder(this, this.mapObject, this.$options.props);
this.mapObject.addTo(this.$parent.mapObject);
this.$emit('ready', this.mapObject);
},
render () {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/components/LControlZoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
this.mapObject = control.zoom(options);
propsBinder(this, this.mapObject, this.$options.props);
this.mapObject.addTo(this.$parent.mapObject);
this.$emit('ready', this.mapObject);
},
render () {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/components/LFeatureGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default {
if (this.visible) {
this.parentContainer.addLayer(this);
}
this.$emit('ready', this.mapObject);
}
};
</script>
1 change: 1 addition & 0 deletions src/components/LGeoJson.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default {
propsBinder(this, this.mapObject, this.$options.props);
this.parentContainer = findRealParent(this.$parent, true);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
},
beforeDestroy () {
this.parentContainer.mapObject.removeLayer(this.mapObject);
Expand Down
1 change: 1 addition & 0 deletions src/components/LGridLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
this.mapObject.createTile = this.createTile;
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
},
beforeDestroy () {
this.parentContainer.removeLayer(this.mapObject);
Expand Down
1 change: 1 addition & 0 deletions src/components/LIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export default {
);
this.scheduleCreateIcon();
this.$emit('ready', this.mapObject);
},
beforeDestroy () {
Expand Down
1 change: 1 addition & 0 deletions src/components/LIconDefault.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
mounted () {
Icon.Default.imagePath = this.imagePath;
propsBinder(this, this.mapObject, this.$options.props);
this.$emit('ready', this.mapObject);
},
methods: {
setImagePath (newVal, oldVal) {
Expand Down
1 change: 1 addition & 0 deletions src/components/LImageOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default {
propsBinder(this, this.mapObject, this.$options.props);
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
},
render () {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/components/LLayerGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default {
if (this.visible) {
this.parentContainer.addLayer(this);
}
this.$emit('ready', this.mapObject);
}
};
</script>
2 changes: 2 additions & 0 deletions src/components/LMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ export default {
DomEvent.on(this.mapObject, this.$listeners);
propsBinder(this, this.mapObject, this.$options.props);
this.ready = true;
// DEPRECATED leaflet:load
this.$emit('leaflet:load');
this.$emit('ready', this.mapObject);
},
methods: {
registerLayerControl (lControlLayers) {
Expand Down
1 change: 1 addition & 0 deletions src/components/LMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default {
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.ready = true;
this.$emit('ready', this.mapObject);
},
methods: {
setDraggable (newVal, oldVal) {
Expand Down
1 change: 1 addition & 0 deletions src/components/LPolygon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default {
this.ready = true;
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
}
};
</script>
1 change: 1 addition & 0 deletions src/components/LPolyline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default {
this.ready = true;
this.parentContainer = findRealParent(this.$parent);
this.parentContainer.addLayer(this, !this.visible);
this.$emit('ready', this.mapObject);
}
};
</script>
Loading

0 comments on commit 1f85fdd

Please sign in to comment.