Uh oh!
There was an error while loading. Please reload this page.
Second jasmine test to lock issue 3101 - #3195
Conversation
| var canvas = d3.select(id).node(); | ||
| var imgData = readPixel(canvas, 0, 0, canvas.width, canvas.height); | ||
| var n = imgData.length * 0.25; |
There was a problem hiding this comment.
A minor change here:
instead of dividing by 4, we use multiply by 0.25 so that we return rgb fractions and avoid possibility of rounding small values to 0.
There was a problem hiding this comment.
shouldn't cause problems but... is there actually a difference between these in js? anyway n should always be an integer, right?
There was a problem hiding this comment.
I'm curious. Can you share an example of this happening in JS?
There was a problem hiding this comment.
(am I missing something? why didn't that link get turned into a code snippet?)
There was a problem hiding this comment.
You are totally right and I tested this on IE, FF and Chrome too.
In JS there is actually no difference in JS between multiplying by 0.25.
Thanks for the note.
etpinard
commented
Nov 1, 2018
Thanks for the test @archmoj Let's merge this in 💃 |

Fixes#3178.
The
getAvgPixelByChannelfunction is revised and now accepts an id to select which gl layer (e.g. focus/pick/context) to be used by different tests.The new jasmine test, checks for the parcoords context layer to remain visible after a restyle call.
@etpinard
@alexcjohnson