autodesk-viewerautodeskautodesk-data-visualization

Previous selected sprite can't be selected again


I'm displaying the project issues using Data Visualization Sprites, and the select (on click) behaviour works like it should, but when I select the sprite again, nothing happens.

The workflow:

1 - When user clicks on an issue sprite, made with viewer.addEventListener(DataVizCore.MOUSE_CLICK, onSelectionEvent);, it opens a side component showing all issue details like title, desciption etc.

2 - When user clicks on the close issue details button I execute: dataVisuzlizationExtension.clearHighlightedViewables(); then clears the seletion

Then if the user click on the same sprite again, the listener doesn't trigger. But if the user clicks on an object and clicks the sprite again it works.

I've alredy tried to select other object with viewer.select(dbId) and clear the selection with viewer.clearSelection() and doesn't work.

A gif showing how it is:

enter image description here


Solution

  • It looks like an issue in the DataViz extension.

    The workaround is to reset selectedDbId to zero manually.

    dataVizExt.clearHighlightedViewables();
    dataVizExt.tool.selectedDbId = 0;
    

    Our apologies for the inconvenience!