Skip to content

Commit 6ee0f25

Browse files
committed
fix gl3d plot show-no-WebGL message
- by making sure it scene creation returns early when WebGL context creation fails.
1 parent ece927f commit 6ee0f25

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib/show_no_webgl_msg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ module.exports = function showWebGlMsg(scene) {
3131
};
3232

3333
var div = document.createElement('div');
34-
div.textContent = 'Webgl is not supported by your browser - visit https://get.webgl.org for more info';
34+
div.className = 'no-webgl';
35+
div.textContent = 'WebGL is not supported by your browser - visit https://get.webgl.org for more info';
3536
div.style.cursor = 'pointer';
3637
div.style.fontSize = '24px';
3738
div.style.color = Color.defaults[0];

src/plots/gl3d/scene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function initializeGLPlot(scene, fullLayout, canvas, gl) {
204204
* The destroy method - which will remove the container from the DOM
205205
* is overridden with a function that removes the container only.
206206
*/
207-
showNoWebGlMsg(scene);
207+
return showNoWebGlMsg(scene);
208208
}
209209

210210
var relayoutCallback = function(scene) {

0 commit comments

Comments
 (0)