Skip to content
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

Fix gl3D on iOS #1411

Merged
merged 1 commit into from
Feb 24, 2017
Merged

Fix gl3D on iOS #1411

merged 1 commit into from
Feb 24, 2017

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Feb 23, 2017

fixes #280 (as far as I know)

Big ups to @dfcreative for the gl-plot3d patch -> gl-vis/gl-plot3d#6 🎉

Reviewers that have access to iOS devices are encouraged to check out http://codepen.io/etpinard/full/vxYezj/ to double check that the fix works as desired.

@etpinard etpinard added status: reviewable bug something broken labels Feb 23, 2017
@etpinard etpinard added this to the 1.24.0 milestone Feb 23, 2017
@rreusser
Copy link
Contributor

Works for me on iPhone 5.

@etpinard
Copy link
Contributor Author

Ok, 3 👍 Let's try this out!

@etpinard etpinard merged commit 2533f04 into master Feb 24, 2017
@etpinard etpinard deleted the gl3d-iOS branch February 24, 2017 18:16
@ityoung2016
Copy link

Does NOT work on iPad 4 running iOS v10.3.2. I tried the latest versions of both Safari and Opera. And as I am somewhat new to this game, assuming a fix is found, where will I be able to access (download) the patch? Thanks for your help.

@rreusser
Copy link
Contributor

@ityoung2016 Are you able to get information about the specific error? Sometimes that means plugging the device into the computer so that you can access the js console via Safari (if on mac). That would be a huge help. Thanks!

@ityoung2016
Copy link

ityoung2016 commented May 22, 2017 via email

@rreusser
Copy link
Contributor

rreusser commented May 22, 2017

Thanks for the extra info! There are a number of extensions webgl is able to take advantage of, so it may be a matter of compatibility of specific features used by the surface plots. Sometimes the solution is a simple fallback or even that it was an artificially imposed limitation in the first place. So it'll take just a bit of debugging, but the report is greatly appreciated! If we're able to pin it down and fix it, it will be released in plotly.js probably within a few days of being fixed.

@ityoung2016
Copy link

Some additional - I think important - information. As I reported above, 3D surface plotting does not work on my iPad which is an iPad4,2, introduced in October 2013. I am running all of the latest system software (v.10.3.2 (14F89)) and that, of course, includes Safari for the iPad. I continue to get the message that "Webgl is not supported by my browser...".

And this is also the message from the latest version of Opera indicating it may be a problem with a basic iPad resource.

But when I try the same thing on my iPhone 6s (again v10.3.2 (14F89)) everything works fine on both Safari and Opera. Surface plots are properly rendered.

This might indicate that the problem is with iPad-specific resources. Does this help?

@ityoung2016
Copy link

This is a followup to my comments and questions of 28 May. Despite a subsequent update to a new iPad and to ALL of the latest software including the plotly.js library (v1.30.0), the problem remains. 3D surface plotting works on my iMac and iPhone but does not work on my iPad. The error message on my iPad is that WebGL is not supported by my Browser (both Safari and Opera). But the WebGL website shows that it is supported. Do you have any ideas of the cause of this problem or how fix it or work around it?

Thank you for your help in this matter.

@bg23
Copy link

bg23 commented Oct 10, 2017

I fixed this problem in my code (where I am using a local copy of plotly) as follows for version 1.31:
When using
https://github.com/plotly/plotly.js/tree/master/dist/plotly.js
then replace "preferFloat: !isMobile" by "preferFloat: 0".
When using
https://github.com/plotly/plotly.js/tree/master/dist/plotly.min.js
then replace "preferFloat: !y" by "preferFloat: 0".
NOTE: There is only one "preferFloat:" present, so it can be found easily.
Now surface plots are working on Safari/iOS, Chrome/Android, Chrome/Windows, Edge/Windows.
On touch devices, touch gestures such as rotation are still clumsy and require some work, probably because the browser defaults for the canvas touch events are not disabled (preventDefault).
This also fixes #280 for me, see my comment there on the bug's origin for iPad.

@ityoung2016
Copy link

Brilliant! Thank you for providing a patch to eliminate the problem with my local copy of plotly.js. It was simple to find and change from "!y" to "0". The question remains if this fix will be implemented in the next official release of plotly and if not then why not? But, nevertheless, thank you, thank you, thank you!

@etpinard
Copy link
Contributor Author

The question remains if this fix will be implemented in the next official release of plotly and if not then why not?

If someone from the community is willing to make a PR, then yeah, why not!

@ityoung2016
Copy link

The information provided by bg23 in October 2017 resolved the problem and I have used an accordingly modified version of 'plotly-latest.min.ls' v1.31.2 since then without problem. Today, I downloaded and installed v1.33.1. It did not need to be modified as 'preferFloat" had already been set to 0. Unfortunately the new version no longer solved the problem; the inability to display 3D surfaces on an iPad (not iPhone or iMac) has returned. All three devices are running the very latest OS versions released this week. Any ideas?

@bg23
Copy link

bg23 commented Jan 25, 2018 via email

@dy dy mentioned this pull request Jan 25, 2018
4 tasks
@ityoung2016
Copy link

Many thanks, bg23, for the advice in your post of yesterday. I never saw your 11 Oct 2017 post concerning the #280 bug. I only saw your post on this thread of 10 October 2017. You must have been very focussed on this problem and your later submission addresses the problem with an understandable, structural solution. I hope it will become a formal part of the "plotly canon".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebGL visualisations not rendering on iOS
4 participants