Skip to content

Commit

Permalink
Merge pull request #2990 from plotly/regl-line2d-bump
Browse files Browse the repository at this point in the history
Fix scattergl missing lines after non-line trace
  • Loading branch information
etpinard authored Sep 11, 2018
2 parents d0ee187 + 045a162 commit c6cdcea
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"gl-streamtube3d": "^1.0.0",
"gl-surface3d": "^1.3.5",
"gl-text": "^1.1.6",
"glslify": "^6.2.1",
"glslify": "^6.3.1",
"has-hover": "^1.0.1",
"has-passive-events": "^1.0.0",
"mapbox-gl": "0.45.0",
Expand All @@ -102,7 +102,7 @@
"polybooljs": "^1.2.0",
"regl": "^1.3.7",
"regl-error2d": "^2.0.5",
"regl-line2d": "^3.0.9",
"regl-line2d": "^3.0.11",
"regl-scatter2d": "^3.0.6",
"regl-splom": "^1.0.4",
"right-now": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scattergl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ function plot(gd, subplot, cdata) {
if(scene.fill2d) {
scene.fillOptions = scene.fillOptions.map(function(fillOptions, i) {
var cdscatter = cdata[i];
if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return null;
if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;
var cd = cdscatter[0];
var trace = cd.trace;
var stash = cd.t;
Expand Down
Binary file added test/image/baselines/gl2d_fill-ordering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_text_chart_basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_text_chart_single-string.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions test/image/mocks/gl2d_fill-ordering.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"data": [
{
"x": [1, 2, 3, 4, 5, 6],
"y": [100, 100, 0, 0, 0, 0],
"fill": "tozeroy",
"type": "scattergl"
},
{
"x": [1, 2, 3, 4, 5, 6],
"y": [0, 0, 0, 100, 100, 0],
"fill": "tozeroy",
"type": "scattergl",
"mode": "none"
},
{
"x": [1, 2, 3, 4, 5, 6],
"y": [99, 99, 99, 100, 100, 100],
"type": "scattergl",
"mode": "lines+markers"
},
{
"x": [1, 2, 3, 4, 5, 6],
"y": [0, 0, 0, null, 50, 50],
"fill": "tozeroy",
"type": "scattergl",
"mode": "none"
},
{
"x": [1, 2, 3, 4, 5, 6],
"y": [100, 0, 0, 0, 0, 100],
"type": "scattergl",
"mode": "lines+markers"
}
],
"layout": {
"margin": {"l": 40, "r": 50, "b": 80, "t": 40},
"legend": {"orientation": "h", "x": "0.5", "xanchor": "center"}
}
}

0 comments on commit c6cdcea

Please sign in to comment.