Commit 23d0e9d5 authored by dindigala's avatar dindigala
Browse files

feat: scrolling text into view when an annotation is selected

parent 00736ca3
Pipeline #219534 passed with stages
in 4 minutes and 55 seconds
......@@ -223,9 +223,17 @@ export default {
}
this.updateHighlightState(selector, 'INC');
this.addIcon(document.getElementById(selector) || document.querySelector(`.${selector}`), annotation);
const el = document.getElementById(selector) || document.querySelector(`.${selector}`);
this.addIcon(el, annotation);
updated[annotation.targetId] = true;
if (el) {
el.scrollIntoView();
}
this.activeAnnotation = updated;
},
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "https://subugoe.pages.gwdg.de/emo/backend/sampledata/collection.json",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json",
"annotations": {
"show": true,
"types": [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment