Commit 877eb52e authored by schneider210's avatar schneider210
Browse files

Merge branch 'feature/#287-merge-text-size-optimization' into 'develop'

text-size-optimization

Closes #287

See merge request subugoe/emo/Qviewer!188
parents 2b3d2218 5abadc59
Pipeline #204604 passed with stages
in 10 minutes and 4 seconds
......@@ -58,7 +58,7 @@ export default {
config: {},
contentTypes: [],
contentUrls: [],
fontsize: 14,
fontsize: 16,
imageurl: '',
isCollection: false,
item: {},
......@@ -394,6 +394,7 @@ export default {
display: flex;
flex: 1;
flex-direction: column;
font-size: 16px;
overflow: hidden;
}
......
......@@ -24,6 +24,7 @@
flat
round
size="sm"
:disable="fontsize >= fontSizeLimits.max"
:title="$t('Increase')"
@click="increase()"
>
......@@ -39,6 +40,7 @@
flat
round
size="sm"
:disable="fontsize <= fontSizeLimits.min"
:title="$t('Decrease')"
:color="$q.dark.isActive ? 'white' : 'accent'"
@click="decrease()"
......@@ -80,7 +82,7 @@ export default {
},
fontsize: {
type: Number,
default: () => 14,
default: () => 16,
},
manifests: {
type: Array,
......@@ -98,6 +100,10 @@ export default {
data: () => ({
activeTab: null,
content: '',
fontSizeLimits: {
min: 14,
max: 24,
},
sequenceindex: 0,
}),
computed: {
......@@ -144,17 +150,21 @@ export default {
},
methods: {
decrease() {
const min = 8;
const { min } = this.fontSizeLimits;
let textsize = this.fontsize;
textsize -= textsize > min ? 1 : 0;
textsize -= textsize > min ? 2 : 0;
if (textsize < min) textsize = min;
this.$root.$emit('update-fontsize', textsize);
},
increase() {
const max = 32;
const { max } = this.fontSizeLimits;
let textsize = this.fontsize;
textsize += textsize < max ? 1 : 0;
textsize += textsize < max ? 2 : 0;
if (textsize > max) textsize = max;
this.$root.$emit('update-fontsize', textsize);
},
getSupport(support) {
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/syriac/collection.json",
"annotations": {
"show": true,
"types": [
......
......@@ -107,7 +107,7 @@ export default {
},
fontsize: {
type: Number,
default: () => 14,
default: () => 16,
},
imageurl: {
type: String,
......
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