Commit c59f2737 authored by dindigala's avatar dindigala
Browse files

refactor: anchoring manifest title to top

parent 3c8543c2
Pipeline #228845 passed with stages
in 3 minutes and 46 seconds
...@@ -466,7 +466,7 @@ export default { ...@@ -466,7 +466,7 @@ export default {
const treeDom = document.getElementById(this.itemurl); const treeDom = document.getElementById(this.itemurl);
if (treeDom) { if (treeDom) {
treeDom.scrollIntoView(); treeDom.scrollIntoView({ block: 'center' });
} }
// NOTE: Set imageurl to an empty string. Otherwise, if there is no corresponding image, // NOTE: Set imageurl to an empty string. Otherwise, if there is no corresponding image,
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:nodes="tree" :nodes="tree"
:selected-color="$q.dark.isActive ? 'grey' : ''" :selected-color="$q.dark.isActive ? 'grey' : ''"
:selected.sync="selected" :selected.sync="selected"
:style="`max-height:${height}px`"
> >
<template <template
#default-body="{node}" #default-body="{node}"
...@@ -53,6 +54,7 @@ export default { ...@@ -53,6 +54,7 @@ export default {
data() { data() {
return { return {
expanded: [], expanded: [],
height: 0,
selected: null, selected: null,
sequenceindex: 0, sequenceindex: 0,
}; };
...@@ -61,6 +63,8 @@ export default { ...@@ -61,6 +63,8 @@ export default {
this.fasCaretRight = fasCaretRight; this.fasCaretRight = fasCaretRight;
}, },
mounted() { mounted() {
this.handleTreePanelHeight();
// select tree node // select tree node
this.selected = treestore.state.selectedItemTree || this.manifests[0].sequence[0].id; this.selected = treestore.state.selectedItemTree || this.manifests[0].sequence[0].id;
...@@ -97,6 +101,15 @@ export default { ...@@ -97,6 +101,15 @@ export default {
} }
}); });
}, },
methods: {
handleTreePanelHeight() {
const el = document.querySelector('.item-content');
if (el && this.height !== el.clientHeight) {
this.height = el.clientHeight;
}
},
},
}; };
</script> </script>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
background-color: $grey-3; background-color: $grey-3;
left: 0; left: 0;
position: sticky; position: sticky;
top: 0; top: -8px;
z-index: 999; z-index: 999;
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
word-break: break-all; word-break: break-all;
user-select: none; user-select: none;
} }
} }
.q-tree { .q-tree {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
--> -->
<script id="tido-config" type="application/json"> <script id="tido-config" type="application/json">
{ {
"entrypoint": "", "entrypoint": "https://ahikar.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json",
"annotations": { "annotations": {
"show": true, "show": true,
"types": [ "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