HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.62k stars 2.43k forks source link

Mouse cursor still visible when crosshair is enabled #5876

Open NickSwardh opened 6 months ago

NickSwardh commented 6 months ago

Describe the bug When the crosshair is enabled, the default cursor is still visible on top of the crosshair. The idea with a crosshair is to provide a clear visual reference point for aiming. The visible mouse cursor defeats the purpose of the crosshair and should be hidden to provide a clear view of the current target.

Additionally, if hovering over an active annotated area while pressing "backspace" to delete the annotation, the mouse cursor changes to a fixed mouse-pointer cursor (this behavior is the same even without crosshair enabled).

To Reproduce Steps to reproduce the behavior:

  1. Go to "Settings" -> "Labeling Interface" and click on "Code"
  2. Enable the crosshair by adding crosshair="true" to the image tag, eg: <Image name="image" value="$image" crosshair="true"/>
  3. Select an image to annotate. The default cursor now follows the crosshair on the screen.
  4. Create an annotation and mark it for editing. While hovering over the active annotation, press "backspace" do delete the annotation. The cursor has now been stuck on a fixed pointer-cursor.

Expected behavior The crosshair should be clear from any cursors, providing the user a clear view with only the guidlines visible _while creating new annotations_. If the user hovers over an existing annotation or marks an annotation for editing, the mouse-cursors should be visible to the user as the annotation is now in "edit"-mode as is the current state. When the user moves the mouse out of an existing annotaion, the mouse-cursor should be hidden, leaving only the crosshair visible again.

Screenshots Cursor is visible when crosshair is enabled image

Cursor is stuck on pointer after deleting an active annotation by pressing "backspace". This behaviour is the same with or without the crosshair enabled. imageimage

Environment (please complete the following information):

Additional context PR submited here: https://github.com/HumanSignal/label-studio/pull/5878

sajarin commented 5 months ago

I know it's been a while but thanks for the issue and the PR @NickSwardh, we'll have an update on this soon. We appreciate your time and effort 🙏