Skip to content

Commit 47bf955

Browse files
committed
add delay before resolve mapobx subplot promises
... to workaround a mapbox-gl bug introduced in 1.3.0
1 parent 5bc21a1 commit 47bf955

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plots/mapbox/mapbox.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ proto.resolveOnRender = function(resolve) {
367367
if(map.loaded()) {
368368
map.off('render', onRender);
369369
// resolve at end of render loop
370-
setTimeout(resolve, 0);
370+
//
371+
// Need a 10ms delay (0ms should suffice to skip a thread in the
372+
// render loop) to workaround mapbox-gl bug introduced in v1.3.0
373+
setTimeout(resolve, 10);
371374
}
372375
});
373376
};

0 commit comments

Comments
 (0)