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

Does the API recognize events on multiple DOM elements #28

Open
ppcano opened this issue Feb 28, 2012 · 5 comments
Open

Does the API recognize events on multiple DOM elements #28

ppcano opened this issue Feb 28, 2012 · 5 comments

Comments

@ppcano
Copy link

ppcano commented Feb 28, 2012

Hi, i am wondering how the API works.

I would like to have in the webpage multiple elements which respond individually to the gesture recognition.

Is that possible with the current version, or on the other hand, the API fires the specific events globally.

Thanks and congratulations for the job.

@royshil
Copy link
Collaborator

royshil commented Feb 28, 2012

@ppcano
The events fire globally and you can create handlers to work with them.
I believe you can have multiple handlers for the same event.

Roy.

@ppcano
Copy link
Author

ppcano commented Feb 28, 2012

@royshil, did you test/plan/discuss during project development, if it could be possible to fire events on individual DOM elements depending if the event was initiated on the visual render area of the specific html element.

$element1.bind("DepthJSEvent", function() {});

$element2.bind("DepthJSEvent", function() {});

On this case, the event should only be fired to the specific element, if the event was initiated at the element rendered area.

I guess, that is not a trivial problem, but that fits perfect for my purpose, and any feedback would be really appreciated.

lg

@royshil
Copy link
Collaborator

royshil commented Mar 4, 2012

@ppcano In fact the "link clicking" capability of the gestual browser application (the standard application for DepthJS) is doing something very similar - looking for lins that are under the blue marker.
You can rewrite that functionality and get what you need...
I encourage you to write a small application that does that and push it back to this repo as an example application.

@ppcano
Copy link
Author

ppcano commented Mar 5, 2012

@royshil, please, could you please point me where the project is located? Now, i have no time to implement anything, so just wanted to take a look and value the required efforts , but i hope i/we write the proof-of-concept app you mentioned.

@royshil
Copy link
Collaborator

royshil commented Mar 5, 2012

@ppcano You can see how the "link clicking" is implemented here:
https://github.com/doug/depthjs/blob/master/extension-common/content_script/selector_box.js
Look at the DepthJS.selectorBox.activate function, see how it looks for elements under the selector

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

2 participants