Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
use mapbox-provided check for mapboxgl
Browse files Browse the repository at this point in the history
  • Loading branch information
vcoppe committed Jan 28, 2024
1 parent d4e6657 commit 5b8360e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2267,8 +2267,6 @@ export default class Buttons {
}

supportsWebGL() {
var canvas = document.createElement("canvas");
var gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
return (gl && gl instanceof WebGLRenderingContext);
return mapboxgl.supported();
};
}

0 comments on commit 5b8360e

Please sign in to comment.