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

Pointer Support - Apply coordinate change from browser context to canvas positioning #484

Closed
itsjamie opened this issue May 22, 2023 · 1 comment · Fixed by #506 or #507
Closed
Assignees
Labels

Comments

@itsjamie
Copy link
Contributor

The current issue is that a user can use collision: true to get if an element is "clicked" but they cannot use this simple event if they wish to know where an item was pressed with the pointer.

The real world case that required us to move outside the pointer API provided by Lightning was a progress bar for player controls supported on LG Smart TVs.

If you wanted to support clicking to seek to a position, there wasn't a good way to know from the provided interface where a user had clicked on a component with collision enabled.

The proposed extension to the API would ideally:

  • convert from browser coordinates to:
    • canvas space
    • component space
@erikhaandrikman erikhaandrikman self-assigned this Jun 19, 2023
@erikhaandrikman
Copy link
Contributor

erikhaandrikman commented Jul 10, 2023

There is PR available: #506

example implementation:

_handleClick(el, { x, y }) {

@uguraslan uguraslan linked a pull request Jul 12, 2023 that will close this issue
@uguraslan uguraslan added this to the July 2023 release milestone Jul 12, 2023
@uguraslan uguraslan moved this to Done in Lightning Jul 12, 2023
@uguraslan uguraslan mentioned this issue Jul 12, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants