Commit 8f7848f3 authored by dindigala's avatar dindigala
Browse files

Merge branch 'feat/#318-text-scroll-into-view' into 'develop'

feat/#318: scrolling text into view when an annotation is selected

See merge request !209
parents 9eef247e 21a4f3b9
Pipeline #222035 passed with stages
in 4 minutes and 25 seconds
......@@ -225,9 +225,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({ behavior: 'smooth' });
}
this.activeAnnotation = updated;
},
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json",
"annotations": {
"show": true,
"types": [
......
Supports Markdown
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