Conversation
- refs to regl2d objects are kept even when options objects are emptied e.g. in the case of legend visible toggles, so don't try to redraw regl2d object with old options.
- use same convert routine for x and y errors, - use same reset options object when initializing and resetting scene options.
| spyOn(scene.error2d, 'draw'); | ||
| spyOn(scene.scatter2d, 'draw'); | ||
|
|
||
| return Plotly.restyle(gd, 'visible', 'legendonly', [0]); |
| if(scene.fill2d) scene.fill2d.draw(i); | ||
| if(scene.fill2d && scene.fillOptions[i]) { | ||
| // must do all fills first | ||
| scene.fill2d.draw(i); |
There was a problem hiding this comment.
Clear improvement over master - but this does raise the question of whether this (not your change, but the structure surrounding it) is really the right behavior, particularly with fill: 'tonext' but also with multiple fills to zero. I can try this out tomorrow and see if my interpretation of what this is doing is accurate, but In svg scatter, each fill gets drawn below any trace that it's attached to (even the trace before it if it's a fill: 'tonext') but above any other trace that comes before it. If all the lines and points are above all the fills, you can get points and lines that look disconnected from their own fills.
src/traces/scattergl/attributes.js
Outdated
| opacity: extendFlat({}, plotAttrs.opacity, { | ||
| editType: 'calc' | ||
| }), | ||
| opacity: extendFlat({}, plotAttrs.opacity) |
There was a problem hiding this comment.
you don't even need the extendFlat, right? overrideAll will take care of that.
| markerOptions.positions = positions; | ||
| } | ||
|
|
||
| function makeErrorOptions(axLetter, errorOpts, vals) { |
| scene = subplot._scene = Lib.extendFlat({}, reset, first); | ||
|
|
||
| // apply new option to all regl components (used on drag) | ||
| scene.update = function update(opt) { |
There was a problem hiding this comment.
cc @dfcreative you were right! scene.update is still used on drag. Added spy+assertion below to 🔏 this thing down.
|
Dima verbally ✅ this PR to me. @alexcjohnson anything else? Your comment in #2442 (comment) probably deserved an issue of its own. |
|
💃 |

fixes #2441 and 🌴 a few things in
scattergl/index.jsalong the way.cc @dfcreative @alexcjohnson