Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17f3378

Browse files
committed
add special case to needsNewSource logic
1 parent 32973fc commit 17f3378

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plots/mapbox/layers.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ proto.update = function update(opts) {
4545
};
4646

4747
proto.needsNewSource = function(opts) {
48+
49+
// for some reason changing layer to 'fill' w/o changing the source
50+
// throws an exception in mapbox-gl 0.18
51+
var changesToFill = (this.layerType !== 'fill' && opts.type === 'fill');
52+
4853
return (
4954
this.sourceType !== opts.sourcetype ||
50-
this.source !== opts.source
55+
this.source !== opts.source ||
56+
changesToFill
5157
);
5258
};
5359

0 commit comments

Comments
 (0)