Skip to content

Commit a26e5e2

Browse files
committed
warn in case first gl3d scene failed
1 parent 0a2513b commit a26e5e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/plots/gl3d/scene.js

+7
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ proto.tryCreatePlot = function() {
151151
} else { // try second time
152152
try {
153153
// invert preserveDrawingBuffer setup which could be resulted from is-mobile not detecting the right device
154+
Lib.warn([
155+
'webgl setup failed possibly due to',
156+
isMobile ? 'disabling' : 'enabling',
157+
'preserveDrawingBuffer config.',
158+
'The device may not be supported by isMobile module!',
159+
'Inverting preserveDrawingBuffer option in second attempt to create webgl scene.'
160+
].join(' '));
154161
isMobile = opts.glOptions.preserveDrawingBuffer = !opts.glOptions.preserveDrawingBuffer;
155162

156163
scene.glplot = createPlot(opts);

0 commit comments

Comments
 (0)