Use package to obtain webgl context#1001
Merged
etpinard merged 2 commits intoplotly:masterfrom Oct 13, 2016
dy:webgl-context
Merged
Use package to obtain webgl context#1001etpinard merged 2 commits intoplotly:masterfrom dy:webgl-context
etpinard merged 2 commits intoplotly:masterfrom
dy:webgl-context
Conversation
rreusser
reviewed
Oct 3, 2016
| 'use strict'; | ||
|
|
||
| var getContext = require('webgl-context') | ||
| var getContext = require('webgl-context'); |
Contributor
There was a problem hiding this comment.
I've just gotten in the habit of running npm run lint-fix before committing, but I wouldn't necessarily recommend against a pre-commit hook that does this automatically 😄
Contributor
There was a problem hiding this comment.
I apologise again for our non-standard linting rules.
Contributor
Author
There was a problem hiding this comment.
There is a rule which highlights literally every line, as far as I use windows 😆
Anyways I had to poke CI once again
Contributor
Contributor
|
As stated in #1001 (comment), this PR does not fix #241, but it does make our gl context creation code a lot more robust. Merging. Thanks @dfcreative |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Replace every entry of
canvas.getContext('webgl')with more reliable context getter webgl-context (it handles errors and returns null if no context available).May be related to the karma cases where context is unavailable.