Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get grabbed component #199

Open
pringithub opened this issue Mar 11, 2021 · 2 comments
Open

Unable to get grabbed component #199

pringithub opened this issue Mar 11, 2021 · 2 comments

Comments

@pringithub
Copy link

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);
    }
}
@LorenzoVonMatterhom
Copy link

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

@ehummel99
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants