Commit 2465db13 authored by schneider210's avatar schneider210
Browse files

refactor: change fontsize units from em to px according to the revie proposal

pls refer to the note: https://gitlab.gwdg.de/subugoe/emo/Qviewer/-/merge_requests/188#note_341244
parent 139220aa
Pipeline #204549 passed with stages
in 6 minutes and 50 seconds
......@@ -58,7 +58,7 @@ export default {
config: {},
contentTypes: [],
contentUrls: [],
fontsize: 1,
fontsize: 16,
imageurl: '',
isCollection: false,
item: {},
......@@ -394,7 +394,7 @@ export default {
display: flex;
flex: 1;
flex-direction: column;
font-size: 1em;
font-size: 16px;
overflow: hidden;
}
......
......@@ -80,7 +80,7 @@ export default {
},
fontsize: {
type: Number,
default: () => 1,
default: () => 16,
},
manifests: {
type: Array,
......@@ -110,7 +110,7 @@ export default {
watch: {
fontsize() {
this.$refs.contentsize.style.fontSize = `${this.fontsize}em`;
this.$refs.contentsize.style.fontSize = `${this.fontsize}px`;
},
async activeTab(url) {
const data = await this.request(url, 'text');
......@@ -134,7 +134,7 @@ export default {
},
mounted() {
this.$refs.contentsize.style.fontSize = `${this.fontsize}em`;
this.$refs.contentsize.style.fontSize = `${this.fontsize}px`;
this.$root.$on('update-sequence-index', (index) => {
if (this.supportType) {
......@@ -144,19 +144,19 @@ export default {
},
methods: {
decrease() {
const min = 0.875;
const min = 14;
let textsize = this.fontsize;
textsize -= textsize > min ? 0.125 : 0;
textsize -= textsize > min ? 2 : 0;
if (textsize < min) textsize = min;
this.$root.$emit('update-fontsize', textsize);
},
increase() {
const max = 1.5;
const max = 24;
let textsize = this.fontsize;
textsize += textsize < max ? 0.125 : 0;
textsize += textsize < max ? 2 : 0;
if (textsize > max) textsize = max;
this.$root.$emit('update-fontsize', textsize);
......
......@@ -107,7 +107,7 @@ export default {
},
fontsize: {
type: Number,
default: () => 1,
default: () => 16,
},
imageurl: {
type: String,
......
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