Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchadwin committed Dec 1, 2017
1 parent d93e5ed commit 79e5bab
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/Leaflet.VectorGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ L.VectorGrid = L.GridLayer.extend({
}

if (styleOptions instanceof Function) {
styleOptions = styleOptions(feat.properties, coords.z, feat.type);
styleOptions = styleOptions(feat.properties, coords.z);
}

if (!(styleOptions instanceof Array)) {
Expand All @@ -109,12 +109,7 @@ L.VectorGrid = L.GridLayer.extend({
var featureLayer = this._createLayer(feat, pxPerExtent);

for (var j = 0; j < styleOptions.length; j++) {
if (styleOptions[j] instanceof Function) {
var styleOption = styleOptions[j](feat.properties, coords.z, feat.type);
} else {
var styleOption = styleOptions[j];
}
var style = L.extend({}, L.Path.prototype.options, styleOption);
var style = L.extend({}, L.Path.prototype.options, styleOptions[j]);
featureLayer.render(renderer, style);
renderer._addPath(featureLayer);
}
Expand Down Expand Up @@ -193,18 +188,15 @@ L.VectorGrid = L.GridLayer.extend({

_updateStyles: function(feat, renderer, styleOptions) {
styleOptions = (styleOptions instanceof Function) ?
styleOptions(feat.properties, renderer.getCoord().z, feat.type) :
styleOptions(feat.properties, renderer.getCoord().z) :
styleOptions;

if (!(styleOptions instanceof Array)) {
styleOptions = [styleOptions];
}

for (var j = 0; j < styleOptions.length; j++) {
var styleOption = (styleOptions[j] instanceof Function) ?
styleOptions[j](feat.properties, renderer.getCoord().z, feat.type) :
styleOptions[j];
var style = L.extend({}, L.Path.prototype.options, styleOption);
var style = L.extend({}, L.Path.prototype.options, styleOptions[j]);
feat.updateStyle(renderer, style);
}
},
Expand Down

0 comments on commit 79e5bab

Please sign in to comment.