-
Notifications
You must be signed in to change notification settings - Fork 27
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
Consider returning normalized coordinates #14
Comments
Do you mean generalizing what you currently do for image widgets? ie, for each click, we would get the dimensions of the widget and return where the click was as a fraction of the total size? |
I hadn't thought about it that way, but yes. I think the only question really is whether the size of the widget includes the border and padding (if any) or not. For images, those are excluded because they aren't part of the image....so I suppose for consistency's sake they should also be excluded for others too. The original suggestion was made at the end here:
@maartenbreddels -- were you thinking normalized versions of all of the coordinates returned? |
For reference, the coordinates currently returned are: Location of the mouse eventThese attributes are standard properties of HTML mouse events.
Additional location for some types of widgets
For widgets (like Label) for which there is no underlying array object these properties are not returned. |
Normalized would be nice, since there may be a scale associated to the image that does not correspond to pixels. And you never know the try image size in the browser right? |
Just to be clear, you mean one normalized coordinate pair, or do you mean normalized versions of each of the x,y coordinates listed above? (screen, client, page, etc). My leaning would be to provide normalized coordinates only for things like an image that have an intrinsic size). |
The only in-browser image size I really trust is the naturalWidth/naturalHeight. My understanding is that the |
Would need to decide whether these are normalized in the current view of the widget or normalized in the "natural" coordinates of the widget, if any.
The text was updated successfully, but these errors were encountered: