1

This event seems to be missing from the standard events. Lick click, I would need to set up a listener for it in a component.

Bo Bennett
  • 13
  • 4

2 Answers2

0

Thanks to Piotr for getting me on the right track. As of this post, there is no double click event for aframe, but we can use js/jquery to get around this. Here is the start of my function:

   el.addEventListener('click', function(evt) {
        \$('#myEmbeddedSce').on('dblclick', function(event) {
                event.stopPropagation();
                event.stopImmediatePropagation();

..... The key was to add the jquery listener inside the aframe listener, and add the stop propagations so the doubleclicks only registered once.

Bo Bennett
  • 13
  • 4
0

use stopPropagation() to detect the double click in the frame.

The stopPropagation() method prevents propagation of the same event from being called. Propagation means bubbling up to parent elements or capturing down to child elements.

Syntax

event.stopPropagation()
Hemant
  • 141
  • 2
  • 10