Skip to content

Commit

Permalink
Fix vue-leaflet#73 Path properties not initialized correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
KoRiGaN committed Sep 27, 2017
1 parent b66c6f4 commit 5067312
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 39 deletions.
72 changes: 36 additions & 36 deletions dist/vue2-leaflet.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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 changes: 7 additions & 0 deletions src/components/LCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ export default {
options[style] = this.lStyle[style];
}
}
const otherPropertytoInitialize = ["smoothFactor", "noClip", "stroke", "color", "weight", "opacity", "lineCap", "lineJoin", "dashArray", "dashOffset", "fill", "fillColor", "fillOpacity", "fillRule", "className" ];
for (var i = 0; i < otherPropertytoInitialize.length; i++) {
const propName = otherPropertytoInitialize[i];
if(this[propName]) {
options[propName] = this[propName];
}
}
this.mapObject = L.circle(this.latLng, options);
eventsBinder(this, this.mapObject, events);
propsBinder(this, this.mapObject, props);
Expand Down
7 changes: 7 additions & 0 deletions src/components/Polygon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export default {
options[style] = this.lStyle[style];
}
}
const otherPropertytoInitialize = ["smoothFactor", "noClip", "stroke", "color", "weight", "opacity", "lineCap", "lineJoin", "dashArray", "dashOffset", "fill", "fillColor", "fillOpacity", "fillRule", "className" ];
for (var i = 0; i < otherPropertytoInitialize.length; i++) {
const propName = otherPropertytoInitialize[i];
if(this[propName]) {
options[propName] = this[propName];
}
}
this.mapObject = L.polygon(this.latLngs, options);
eventsBinder(this, this.mapObject, events);
propsBinder(this, this.mapObject, props);
Expand Down
7 changes: 7 additions & 0 deletions src/components/Polyline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export default {
options[style] = this.lStyle[style];
}
}
const otherPropertytoInitialize = ["smoothFactor", "noClip", "stroke", "color", "weight", "opacity", "lineCap", "lineJoin", "dashArray", "dashOffset", "fill", "fillColor", "fillOpacity", "fillRule", "className" ];
for (var i = 0; i < otherPropertytoInitialize.length; i++) {
const propName = otherPropertytoInitialize[i];
if(this[propName]) {
options[propName] = this[propName];
}
}
this.mapObject = L.polyline(this.latLngs, options);
eventsBinder(this, this.mapObject, events);
propsBinder(this, this.mapObject, props);
Expand Down
7 changes: 7 additions & 0 deletions src/components/Rectangle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export default {
options[s] = this.lStyle[s];
}
}
const otherPropertytoInitialize = ["smoothFactor", "noClip", "stroke", "color", "weight", "opacity", "lineCap", "lineJoin", "dashArray", "dashOffset", "fill", "fillColor", "fillOpacity", "fillRule", "className" ];
for (var i = 0; i < otherPropertytoInitialize.length; i++) {
const propName = otherPropertytoInitialize[i];
if(this[propName]) {
options[propName] = this[propName];
}
}
this.mapObject = L.rectangle(this.bounds, options);
eventsBinder(this, this.mapObject, events);
propsBinder(this, this.mapObject, props);
Expand Down

0 comments on commit 5067312

Please sign in to comment.