Skip to content
Open
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 docs/components/LImageOverlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default {
| visible | | boolean | - | true |
| interactive | | boolean | - | false |
| bubblingMouseEvents | | boolean | - | true |
| url | | string | - | |
| bounds | | | - | |
| opacity | | number | - | 1.0 |
| alt | | string | - | '' |
Expand All @@ -68,6 +67,7 @@ export default {
| zIndex | | number | - | 1 |
| className | | string | - | '' |
| options | Leaflet options to pass to the component constructor | object | - | {} |
| url | | string | - | null |

## Events

Expand Down
7 changes: 7 additions & 0 deletions src/components/LImageOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import { imageOverlay, DomEvent } from 'leaflet';
export default {
name: 'LImageOverlay',
mixins: [ImageOverlayMixin, Options],
props: {
url: {
type: String,
custom: true,
default: null
}
},
mounted() {
const options = optionsMerger(this.imageOverlayOptions, this);
this.mapObject = imageOverlay(this.url, this.bounds, options);
Expand Down
4 changes: 0 additions & 4 deletions src/mixins/ImageOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import InteractiveLayer from './InteractiveLayer';
export default {
mixins: [Layer, InteractiveLayer],
props: {
url: {
type: String,
custom: true
},
bounds: {
custom: true
},
Expand Down
11 changes: 7 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ declare module "vue2-leaflet" {
}
class ImageOverlay extends Mixins(Layer, InteractiveLayer) {
// props
url: string;
/**
* @default true
*/
bounds: boolean;
/**
* @default 1.0
Expand Down Expand Up @@ -489,6 +485,13 @@ declare module "vue2-leaflet" {
setImagePath(newVal: string, oldVal?: string): void;
}
class LImageOverlay extends Mixins(ImageOverlay) {
// props
/**
* @default null
*/
url: string | null;

// data
mapObject: L.ImageOverlay;
parentContainer: any;
}
Expand Down