aframe-click-drag-component icon indicating copy to clipboard operation
aframe-click-drag-component copied to clipboard

Not able to click and drag an entity made up of other entities

Open pubaayaam opened this issue 7 years ago • 3 comments

@jesstelford @ngokevin I have created a dice entity from six plane entities. However, when I click and drag the dice entity, instead of moving that dice, only one sided face gets dragged. This can be tried hands on at link http://shrouded-chamber-73425.herokuapp.com/

pubaayaam avatar Jul 18 '17 19:07 pubaayaam

Any news regarding this issue?

andreiciungan avatar Sep 29 '17 11:09 andreiciungan

It does not work actually

pubaayaam avatar Oct 04 '17 17:10 pubaayaam

I got round it with this

   setAttributeFamily(el,'click-drag',true)

    function setAttributeFamily(el,attribute,value){
      el.setAttribute(attribute,value)
      const children = [].slice.call(el.children)
      children.forEach((child)=> child.setAttribute(attribute, value))
      if(el.parentNode.classList.contains('hotspot'))
        el.parentNode.setAttribute(attribute, value)
    }

bknill avatar Feb 05 '18 21:02 bknill