Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mapbox-gl to v1.3.2 #4230

Merged
merged 4 commits into from
Sep 30, 2019
Merged
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
30 changes: 12 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"glslify": "^7.0.0",
"has-hover": "^1.0.1",
"has-passive-events": "^1.0.0",
"mapbox-gl": "1.1.1",
"mapbox-gl": "1.3.2",
"matrix-camera-controller": "^2.1.3",
"mouse-change": "^1.4.0",
"mouse-event-offset": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/plots/mapbox/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

var requiredVersion = '1.1.1';
var requiredVersion = '1.3.2';

var stylesNonMapbox = {
'open-street-map': {
Expand Down
5 changes: 4 additions & 1 deletion src/plots/mapbox/mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ proto.resolveOnRender = function(resolve) {
if(map.loaded()) {
map.off('render', onRender);
// resolve at end of render loop
setTimeout(resolve, 0);
//
// Need a 10ms delay (0ms should suffice to skip a thread in the
// render loop) to workaround mapbox-gl bug introduced in v1.3.0
setTimeout(resolve, 10);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@archmoj w/o this extra 10ms delay, call sequences like

// off the `mapbox_0` mock
Plotly.restyle(gd, 'visible', false)
.then(() => Plotly.restyle(gd, 'visible', true))
.then(() => Plotly.restyle(gd, 'visible', 'legendonly', [1]))

fails and logs

image


I suspect this is caused by mapbox/mapbox-gl-js#8633 - but I haven't investigated further.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I'll leave this conversation open so that it is noticed by in the QA.

}
});
};
Expand Down