File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,7 @@ export default {
506
506
this.overlay = overlayCanvas;
507
507
this.drawAPI = DrawLoader.getFallbackDrawAPI(this.canvas, this.overlay);
508
508
this.$emit('plot-reinitialize-canvas');
509
+ console.warn(`📈 fallback to 2D canvas`);
509
510
},
510
511
removeChartElement(series) {
511
512
const elements = this.seriesElements.get(toRaw(series));
Original file line number Diff line number Diff line change @@ -154,14 +154,14 @@ DrawWebGL.prototype.initContext = function () {
154
154
DrawWebGL . prototype . destroy = function ( ) {
155
155
// Lose the context and delete all associated resources
156
156
// https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#lose_contexts_eagerly
157
- this . gl . getExtension ( 'WEBGL_lose_context' ) . loseContext ( ) ;
158
- this . gl . deleteBuffer ( this . buffer ) ;
157
+ this . gl ? .getExtension ( 'WEBGL_lose_context' ) ? .loseContext ( ) ;
158
+ this . gl ? .deleteBuffer ( this . buffer ) ;
159
159
this . buffer = undefined ;
160
- this . gl . deleteProgram ( this . program ) ;
160
+ this . gl ? .deleteProgram ( this . program ) ;
161
161
this . program = undefined ;
162
- this . gl . deleteShader ( this . vertexShader ) ;
162
+ this . gl ? .deleteShader ( this . vertexShader ) ;
163
163
this . vertexShader = undefined ;
164
- this . gl . deleteShader ( this . fragmentShader ) ;
164
+ this . gl ? .deleteShader ( this . fragmentShader ) ;
165
165
this . fragmentShader = undefined ;
166
166
this . gl = undefined ;
167
167
You can’t perform that action at this time.
0 commit comments