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

triggerRegrab() is useful but hard to use #166

Open
lionleaf opened this issue Oct 4, 2020 · 0 comments
Open

triggerRegrab() is useful but hard to use #166

lionleaf opened this issue Oct 4, 2020 · 0 comments

Comments

@lionleaf
Copy link
Contributor

lionleaf commented Oct 4, 2020

I spent some time at the hackathon trying to implement a GadgetSeed-like behaviour for caardvark. I want to be able to start grabbing the "new card button" and have the new card be spawned and immediately grabbed, like when you drag a gadget out of the menu.

Registering a callback on startGrab to spawn the new card is straight forward, but using the triggerRegrab function is not unless I'm missing something. I faced two main issues:

  1. You can't call triggerRegrab() on an AvStandardGrabbable since the moveable component is private (I had to fork AvStandardMoveable).
  2. It is not clear what reference to pass into triggerRegrab() for it to actually initiate a grab on the object you want. This one I never figured out before running out of time.

Maybe a wrapper function in AvStandardGrabbable is all that's required?

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

1 participant