Open ComfyFluffy opened 3 months ago
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.
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.
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:
hovering
and dragging
dragging
cursor overrides the hovering
cursorWith 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.
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.
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
andmouseleave
events are now not triggered, so the cursor will not be reset until mouse move. This could be resulted by https://github.com/konvajs/konva/commit/73d65cb7d3e8e1274913a3f604e081c0fab93f6dYou can reproduce the issue at: https://konvajs.org/docs/select_and_transform/Basic_demo.html