diff --git a/packages/frontend/src/main/components/viewer/ViewerBubbles.vue b/packages/frontend/src/main/components/viewer/ViewerBubbles.vue index e1af742d2..f4c423477 100644 --- a/packages/frontend/src/main/components/viewer/ViewerBubbles.vue +++ b/packages/frontend/src/main/components/viewer/ViewerBubbles.vue @@ -246,22 +246,31 @@ export default { window.addEventListener('beforeunload', async () => { await this.sendDisconnect() }) + this.viewer.on( - 'select', + ViewerEvent.ObjectDoubleClicked, debounce((selectionInfo) => { - this.selectedIds = selectionInfo.userData.map((o) => o.id) - this.selectionLocation = selectionInfo.location - this.selectionCenter = selectionInfo.selectionCenter - this.sendUpdateAndPrune() + this.sendSelectionUpdate(selectionInfo) + }, 50) + ) + this.viewer.on( + ViewerEvent.ObjectClicked, + debounce((selectionInfo) => { + this.sendSelectionUpdate(selectionInfo) }, 50) ) - this.viewer.on(ViewerEvent.ObjectDoubleClicked, () => {}) }, async beforeDestroy() { await this.sendDisconnect() window.clearInterval(this.updateInterval) }, methods: { + sendSelectionUpdate(selectionInfo) { + this.selectedIds = selectionInfo.userData.id + this.selectionLocation = selectionInfo.location + this.selectionCenter = selectionInfo.selectionCenter + this.sendUpdateAndPrune() + }, setUserPow(user) { const camToSet = user.camera if (camToSet[6] === 1) {