Skip to content

Commit a8fd24f

Browse files
archmojetpinard
authored andcommitted
fixups
1 parent dbf4e29 commit a8fd24f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/traces/parcoords/parcoords.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,14 @@ module.exports = function(root, svg, parcoordsLineLayers, styledData, layout, ca
457457
parcoordsLineLayer
458458
.each(function(d) {
459459
if(d.viewModel) {
460-
if((!d.lineLayer) ||
461-
(callbacks)) { // recreate in case of having callbacks e.g. restyle. Should we test for callback to be a restyle?
460+
if(!d.lineLayer || callbacks) { // recreate in case of having callbacks e.g. restyle. Should we test for callback to be a restyle?
462461
d.lineLayer = lineLayerMaker(this, d);
463462
} else d.lineLayer.update(d);
464463

465-
if(d.key) d.viewModel[d.key] = d.lineLayer;
464+
if(d.key || d.key === 0) d.viewModel[d.key] = d.lineLayer;
466465

467-
var setChanged = ((!d.context) || // don't update background
468-
(callbacks)); // unless there is a callback on the context layer. Should we test the callback?
466+
var setChanged = (!d.context || // don't update background
467+
callbacks); // unless there is a callback on the context layer. Should we test the callback?
469468

470469
d.lineLayer.render(d.viewModel.panels, setChanged);
471470
}

test/jasmine/tests/parcoords_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ describe('parcoords basic use', function() {
913913

914914
});
915915

916-
it('@gl Calling `Plotly.restyle` with a string path should amend the preexisting parcoords', function(done) {
916+
it('@gl Calling `Plotly.restyle` with a string path to colorscale should amend the preexisting parcoords', function(done) {
917917

918918
expect(gd.data.length).toEqual(1);
919919

0 commit comments

Comments
 (0)