menpo / landmarker.io

Image and mesh annotation web application
https://www.landmarker.io
BSD 3-Clause "New" or "Revised" License
114 stars 21 forks source link

Arrow keys don't work outside group mode #109

Open csagonas opened 9 years ago

csagonas commented 9 years ago

Notes by @jabooth:

It feels quite natural to be able to use the arrow keys to budge single-selected landmarks around, but this is only enabled for groups (which is two or more landmarks). Can we change it so we can always use the arrow keys?

lirsacc commented 9 years ago

Two things about this:

  1. The intention was that normal / snap mode be limited to quick manipulation with the mouse. More specialised actions (only arrow translate for now) are available in group mode and intentionally not mixed up with the basic behaviour. In group mode an accidental click will at worst lose your selection while an accidental click after translating in snap mode would cancel out what you just did (easily solved with undoing, but ideally we'd avoid the possibility of mistakes)
  2. entering group mode with only one point is possible (shif+drag should work) but we could easily have an easier way to handle such sticky selection, maybe the L key for lock and make future group mode feature (rotation, scaling, ...) dependent on the number of points. Which would solve the problem while keeping the modes separate.

What do you think @jabooth ?

jabooth commented 9 years ago

@lirsacc giving this some thought, will get back to you tonight...

jabooth commented 9 years ago

Sorry I'm late getting back to you on this @lirsacc.

The intention was that normal / snap mode be limited to quick manipulation with the mouse. More specialised actions (only arrow translate for now) are available in group mode and intentionally not mixed up with the basic behaviour.

I agree with this premise, but I feel that point translation is something that doesn't have to be in group mode. Things like rotation and scale (when they eventually come) only makes sense in a group mode (mathematically, these operations are no-ops on infinitesimal points at the origin). Translation however is something that is well defined on a single point. It makes sense in group mode too of course, but that is a secondary concern.

entering group mode with only one point is possible (shif+drag should work)

I would count this as a bug. Group mode should be uniquely defined by the number of points selected. If more than one point is selected, it's group mode. The mechanism by which you select the points shouldn't influence this.

but we could easily have an easier way to handle such sticky selection, maybe the L key for lock and make future group mode feature (rotation, scaling, ...) dependent on the number of points. Which would solve the problem while keeping the modes separate.

I think by following the above 'multiple points = group mode' logic removes this need?

In summary, we would like to get to having three states:

In this bigger picture, keyboard translation not working when we have one landmark selected seems strange.