aframe-super-hands-component icon indicating copy to clipboard operation
aframe-super-hands-component copied to clipboard

Unable to get grabbed component

Open pringithub opened this issue 4 years ago • 2 comments

Hi -

I'd like to simply get the component that is being grabbed. In the readme, it says that that component will have a 'grabbed' attribute set.

When I run the following code (registering xbuttondown), I don't see the txt component changing, and in fact this code never runs.

const txt = document.getElementById("txt");
for (let item of items) {
    if (item.hasAttribute('grabbed')) {
        txt.setAttribute("value", item.id);
    }
}

pringithub avatar Mar 11 '21 21:03 pringithub

I may be wrong but why dont you use the grab-start grab-end events?

LorenzoVonMatterhom avatar Mar 15 '21 07:03 LorenzoVonMatterhom

hi! not sure if you've figured out your issue but you might want to try item.is('grabbed')'

ehummel99 avatar May 08 '21 05:05 ehummel99