daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.08k stars 618 forks source link

Cursor style doesn't change when edgeDraggable: true #703

Closed pclancysc closed 2 years ago

pclancysc commented 2 years ago

Environments

Description

When resize is enabled on east and west edges and edge drag is also enabled the cursor doesn't change to a "drag/move" icon when the pointer is on an edge that will drag.

Sinced the edge is a div that only has the classes moveable-line and moveable-direction I can't find a way to show the appropiate cursor. If the n, e, s w edge could be detected on hover the class names could be modified to indicate which edge the pointer is over and then apply the appropiate cursor style.

e.g.

Pointer over top edge: moveable-line moveable-direction.moveable-n Pointer over left edge: moveable-line moveable-direction.moveable-w

Is there any other solution that doesn't involve adding these classes in code?

daybrush commented 2 years ago

@pclancysc

moveable's new version is released. When edgeDraggable is used, the cursor changes to move.

pclancysc commented 2 years ago

@daybrush Thanks for the speedy fix. One thing that may or may not be an issue is that when I upgraded ngx-moveable I had errors regarding React types. I had to install @types/react to compile.

daybrush commented 2 years ago

@pclancysc

I'll check. Most likely I set the type wrong.