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

Device API internals #8

Open
nfroidure opened this issue Oct 23, 2013 · 0 comments
Open

Device API internals #8

nfroidure opened this issue Oct 23, 2013 · 0 comments
Labels

Comments

@nfroidure
Copy link
Member

When moving the mouse cursor like this:

mouse.moveTo(element);

It is possible that "element" is in fact currently not in the viewport, so, the cursor actually cannot go over the element without scrolling first.

Currently, it automatically scroll to ensure the cursor can be put over the element:

this.scroll(x, y, options);

Is it the right behavior or would you prefer the API to throw an exception and let you manage scroll yourself?

The same kind of issue can be found with a mouse click. To be able to click an element, the cursor must first be placed over it. It is also done automatically right now:

this.moveTo(element);

It lead to an easyer to use API but it's a bit less flexible. Your opinion is very welcome!

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

No branches or pull requests

1 participant