facets icon indicating copy to clipboard operation
facets copied to clipboard

Weird effects after setting filteredDataIndices

Open rmcloughlin opened this issue 4 years ago • 2 comments

Settings the filteredDataIndices property on a <facets-dive> component causes some weird things to happen in the UI.

  1. There sometimes seem to be two copies of the moving yellow selection rectangle.

Screen Shot 2020-03-09 at 12 06 24 PM

  1. You can select data points that aren't visualized.

Screen Shot 2020-03-09 at 12 06 46 PM

To reproduce, go to https://pair-code.github.io/facets/quickdraw.html, then in the chrome devtools console, run

const fdComponent = document.querySelector('facets-dive');
fdComponent.filteredDataIndices = [0,1,2,3,4,5];
// then click somewhere not on the six faces
// then click on one of the six faces

rmcloughlin avatar Mar 09 '20 16:03 rmcloughlin

This is on Google Chrome 80.0.3987.132 on Mac OS 10.15.3

rmcloughlin avatar Mar 09 '20 16:03 rmcloughlin

Thanks for the report. I'm able to repro the issue and see that selecting items outside of this displayed is possible, and causes fdComponent.selectedIndices to show items selected that shouldn't be visible, and selecting the top-right element in your case causes selectedIndices to contain the correct datapoint index, and also a second index for an item that shouldn't be visible.

jameswex avatar Mar 09 '20 17:03 jameswex