Plotly.js: The typed array polyfill we provide in dist/ does not polyfill ArrayBuffer.isView

Created on 19 Jul 2017  Â·  10Comments  Â·  Source: plotly/plotly.js

First reported in https://github.com/ropensci/plotly/issues/1055

In our src code, we add a fallback to ArrayBuffer.isView here, but @dfcreative 's color-parse does not. This lead to 3D and gl2d (and anything else using color-rgba) breaking in RStudio even with typed array polyfill we provide in dist/.

So, we could of course patch color-parse to include an isView fallback, this will fix this one case. But maybe instead we could add a ArrayBuffer.isView polyfill to the typedarray.min.js we provide which will solve this problem for all our dependencies.

By the way, does anyone know where typedarray.min.js comes from?

cc @alexcjohnson @cpsievert @bcdunbar

bug ♥ NEEDS SPON$OR

Most helpful comment

Actually, I'll reopen this issue.

1915 _fixed_ the issue, but _the typed array polyfill we provide in dist/ does not polyfill ArrayBuffer.isView_ still holds.

All 10 comments

@etpinard I can just check if ArrayBuffer has that method.

@etpinard I can just check if ArrayBuffer has that method.

Yeah, that would be great thanks :+1:

Thanks @dfcreative I'll include your fix in the next patch release 1.29.1 (probably coming next Monday).

Oops. I forgot to include this in 1.29.1. My mistake.

@dfcreative would you mind publishing https://github.com/colorjs/color-parse/commit/4be59c59c9f063b71d87b0c8e8cbde11349c2530#diff-168726dbe96b3ce427e7fedce31bb0bcL164 and making a PR here bumping color-rgba?

fixed by https://github.com/plotly/plotly.js/pull/1915 (verification made by @cpsievert )

Actually, I'll reopen this issue.

1915 _fixed_ the issue, but _the typed array polyfill we provide in dist/ does not polyfill ArrayBuffer.isView_ still holds.

This issue has been tagged with NEEDS SPON$OR

A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

Sponsorship range: $5k-$10k

What Sponsorship includes:

  • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryaan picture bryaan  Â·  3Comments

hashimmoosavi picture hashimmoosavi  Â·  3Comments

chriddyp picture chriddyp  Â·  3Comments

jonmmease picture jonmmease  Â·  3Comments

tim-sauchuk picture tim-sauchuk  Â·  3Comments