pelagios / recogito2

Semantic Annotation Without the Pointy Brackets
Apache License 2.0
153 stars 30 forks source link

re-ordering tags #636

Closed kyriakikon closed 4 years ago

kyriakikon commented 5 years ago

Hi Reiner, We have been using a lot of tags for the Pausanias' Periegesis project and we are facing the following problem: we understand that the ordering of the tags is very important; sometimes, though, we miss out a tag or we want to add a new one and, in order to do this, we have to delete all the previous tags before we put the specific tag in its right place. Is there any way we can drag and drop a tag from the end to e.g. the middle (in-between other existing tags), without having to delete the existing previous tags?
I hope that this makes sense...

rsimon commented 5 years ago

Hi,

hm, I need to think about this one. I think the WebAnno model doesn't really have a notion of order for tags (which are each expressed as one separate "annotation body"). Although Recogito would generally retain the order in which they were created.

Drag-and-drop ordering would be something that could be implemented, although I frankly can't say if I would get around to doing that any time soon. For the time being, deleting & re-typing the previous tags might be your only option if order is important for you.

Cheers, Rainer

rsimon commented 5 years ago

If anyone wants to pick up the dev work on this: it's not a hugely complicated thing, if you know your way around old-school jQuery code. The JS that renders the tag section of the editor is here:

https://github.com/pelagios/recogito2/blob/master/app/assets/javascripts/document/annotation/common/editor/sections/tag/tagSection.js

Off the top of my head, I don't think there would be any need to write code outside of this particular source file. In any case, I'm happy to assist with any integration work should it be needed.