Hi @alex
By default the viewer is selecting and focusing on object when using double-click (or focusing the entire scene if double-clicked on no objects).
I would like to use double-click exclusively to show/hide dimensions. I already manage to do it with the code below, but it is in conflict with the default behavior (sometimes doing one, sometimes the other).
Is there a way to deactivate the default event?
Thanks!
const doubleClickedNode = event.hits[0].node;
if (doubleClickedNode.model.raw.IsSketch === "yes") {
const parentCollection = doubleClickedNode.parent;
const dimensionsLinesProfiles =
parentCollection.model.raw.Profiles.filter(
(item: any) => !item.IsSketch
);
for (const profile of dimensionsLinesProfiles) {
const filteringState = filtering.filteringState;
if (filteringState.hiddenObjects.includes(profile.id)) {
filtering.showObjects([profile.id]);
} else {
filtering.hideObjects([profile.id]);
}
}
}