Skip to content

Use package to obtain webgl context #1001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2016
Merged

Use package to obtain webgl context #1001

merged 2 commits into from
Oct 13, 2016

Conversation

dy
Copy link
Contributor

@dy dy commented Oct 3, 2016

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.

@@ -1,6 +1,6 @@
'use strict';

var getContext = require('webgl-context')
var getContext = require('webgl-context');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologise again for our non-standard linting rules.

Copy link
Contributor Author

@dy dy Oct 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a rule which highlights literally every line, as far as I use windows 😆
Anyways I had to poke CI once again

@etpinard
Copy link
Contributor

etpinard commented Oct 4, 2016

👍 for adding in webgl-context as a dep.

But, looks like CircleCI is still having issues creating a WebGL context in FF booted by karma:

image

@etpinard
Copy link
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

@etpinard etpinard added this to the On-par gl2d milestone Oct 13, 2016
@etpinard etpinard merged commit 7db1b00 into plotly:master Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants