Annotald / annotald

A program for annotation in the Penn Treebank format
GNU General Public License v3.0
8 stars 3 forks source link

Can't coindex off-screen #75

Closed diertani closed 8 years ago

diertani commented 9 years ago

It appears to be the case that if you need to co-index two nodes, but the sentence is long enough that you can only see one of them at a time on your screen, Annotald won't let you co-index the nodes.

There's an easy work-around (you co-index something that would be on both screens, and then remove the index), but it's kind of tedious.

aecay commented 9 years ago

I cannot reproduce this issue. What happens when you press the "c" key in the problematic case? Nothing? Do any messages appear in the javascript console when this happens? (Menu button to the right of the address bar > More Tools > Javascript Console)

Does the issue persist if you zoom out (Menu button > Zoom) so that both nodes are visible on the screen at the same time? Depending on the distance, you may not be able to read the text at the appropriate zoom setting. You may have to select both nodes, zoom out until both are visible, press "c", and then zoom in again to verify whether they have coindexed.

diertani commented 9 years ago

Nothing happens in the problematic case, if it's just co-indexation. If it's something more complicated like traces, it inserts a node right next to the visible one. Nothing appears in the Javascript console. It will let me coindex if I zoom out.

I suspect this has something to do with the fact that I'm having to use the touchpad on my laptop instead of an external mouse now, for wrist reasons. I'm using the arrow keys to scroll, not the touchpad, but I didn't notice this until after I'd made that switch.

aecay commented 9 years ago

I don't understand exactly what's going on here. Can you give me a step-by-step recipe to reproduce the bug? (I suspect the arrow key thing you mention may be important, so please do pay attention to whether your recipe uses arrow keys/scroll bar/other means to scroll).

diertani commented 9 years ago

You're absolutely right: it's about the arrow keys. I can get a similar result without needing to co-index anything at all, and with both nodes being visible on screen. All I have to do to get the bug is:

  1. Ascertain that no nodes are presently selected.
  2. Select a node (with the touchpad, in my case).
  3. Use the arrow keys to scroll (doesn't matter how long; one keystroke is enough).
  4. Select another node.

The first node selected is immediately de-selected.

I think I didn't realise how general the problem was because it was easy to assume that I'd had two nodes selected without noticing, since sometimes I do. (It took me quite a while of noticing this with the coindexation case to convince myself that it wasn't a product of me having had multiple nodes selected.)

aecay commented 9 years ago

Now I understand. Annotald detects key presses, so that you can select a node with the mouse, press a key to modify it, and then click another node to immediately begin working on it (instead of having to clear the selection with space, or having the second-clicked node become part of a dual selection). Currently it does not distinguish between keys which can modify the node and arrow keys. So I will make it not count the arrow keys as a keypress.

diertani commented 9 years ago

Thank you! I'm sorry I was distracted from the actual situation by the context in which I'd noticed it.