DDMAL / Neon

A web-based MEI neume editor.
https://ddmal.music.mcgill.ca/Neon
MIT License
25 stars 9 forks source link

Small request concerning highlighted element and selection mode #1200

Open JoyfulGen opened 7 months ago

JoyfulGen commented 7 months ago

If a user clicks on a selection mode in the EDIT panel, whatever element on the page is currently highlighted automatically un-highlights. This makes sense; normally, if the user is choosing a new selection mode, it means they want to select something different than what is currently highlighted. However! I would like to make the following request: if the user chooses a selection mode that is the same as the current highlighted element, that element remains highlighted. So for example, if a nc is highlighted and I choose the nc selector, the nc on the page remains highlighted. There are two situations where this can happen:

  1. The obvious one is just re-choosing the selection you're currently in. I know this is redundant, but I accidentally do it fairly often because of my built-in keyboard shortcut habits.
  2. The other one is a specific case: if you click on a text nugget in the "Syllables on this page" box, edit the text, and press enter, the relevant syllable and bounding box become highlighted, regardless of the current selection mode. In this specific case, would it be possible for the syllable to stay highlighted if the user chooses the syllable selector, and for the bbox to stay highlighted if the user chooses the bbox selector?