Skip to content

Commit 759dbb4

Browse files
committed
use update instead of restyle & relayout when updating shape legends
1 parent 15986b8 commit 759dbb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/components/legend/handle_click.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@ module.exports = function handleClick(g, gd, numClicks) {
289289
}
290290
}
291291

292-
Registry.call('_guiRestyle', gd, dataUpdate, dataIndices).then(function() {
293-
if(shapesUpdated) {
294-
Registry.call('_guiRelayout', gd, {shapes: updatedShapes});
295-
}
296-
});
292+
if(shapesUpdated) {
293+
Registry.call('_guiUpdate', gd, dataUpdate, {shapes: updatedShapes}, dataIndices);
294+
} else {
295+
Registry.call('_guiRestyle', gd, dataUpdate, dataIndices);
296+
}
297297
}
298298
};

0 commit comments

Comments
 (0)