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

mouseout/mouseleave event not triggered while transforming #1810

Closed
ComfyFluffy opened this issue Aug 22, 2024 · 4 comments
Closed

mouseout/mouseleave event not triggered while transforming #1810

ComfyFluffy opened this issue Aug 22, 2024 · 4 comments

Comments

@ComfyFluffy
Copy link

In Transformer when we drag the rotator or other anchors the cursor will change. In the previous versions, the cursor will be reset immediately when the mouse leave the anchor. However, mouseout and mouseleave events are now not triggered, so the cursor will not be reset until mouse move. This could be resulted by 73d65cb

You can reproduce the issue at:
https://konvajs.org/docs/select_and_transform/Basic_demo.html

@ComfyFluffy
Copy link
Author

In previous versions the cursor resets once the mouse leave the node, which is also not quite right as the cursor should be kept when dragging. I would like to open a PR to fix that. However, I don't know how can I fix it if we can not get when exactly the mouse leave the node.

@lavrton
Copy link
Member

lavrton commented Sep 13, 2024

I think we can reset the cursor on when transform is finished. The PR is very welcome. If with the test, it is another level of awesomeness.

@ComfyFluffy
Copy link
Author

Resetting the cursor is not sufficient, as the cursor may still stay on the cursor when the transformation is finished. We need the accurate hover information for a good implementation, which is why I opened the issue.

Actually I want to fully transform the cursor setting logic:

  • Every control node has two types of cursor: hovering and dragging
  • dragging cursor overrides the hovering cursor
  • Every time we need to update the cursor, find the first node with active cursor that is on the top and apply the cursor. If none, reset the cursor.

With this we can implement a rotator that has grab as its hovering cursor and grabbing as its dragging cursor. When rotating the cursor is always dragging, whether its being hovered or not.

@lavrton
Copy link
Member

lavrton commented Sep 16, 2024

Maybe, but it sounds like an overkill for me.

as the cursor may still stay on the cursor when the transformation is finished

I don't see that is a large issue. We can enable hover back in that case.

@lavrton lavrton closed this as completed Dec 6, 2024
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