Skip to content
Snippets Groups Projects

WIP: feat: change the fontsize consistently by percentage

Closed schneider210 requested to merge feature/#178-change-fontsize-consistently into develop
All threads resolved!
Files
3
@@ -81,7 +81,7 @@ export default {
},
fontsize: {
type: Number,
default: () => 14,
default: () => null,
},
manifests: {
type: Array,
@@ -111,7 +111,7 @@ export default {
watch: {
fontsize() {
this.$refs.contentsize.style.fontSize = `${this.fontsize}px`;
this.$refs.contentsize.style.fontSize = `${this.fontsize}%`;
},
activeTab(url) {
this.request(url, 'text').then((data) => {
@@ -133,7 +133,7 @@ export default {
},
mounted() {
this.$refs.contentsize.style.fontSize = `${this.fontsize}px`;
this.$refs.contentsize.style.fontSize = `${this.fontsize}%`;
this.$root.$on('update-sequence-index', (index) => {
if (this.supportType) {
@@ -143,17 +143,17 @@ export default {
},
methods: {
decrease() {
const min = 8;
const min = 90;
let textsize = this.fontsize;
textsize -= textsize > min ? 1 : 0;
textsize -= textsize > min ? 10 : 0;
this.$root.$emit('update-fontsize', textsize);
},
increase() {
const max = 32;
const max = 150;
let textsize = this.fontsize;
textsize += textsize < max ? 1 : 0;
textsize += textsize < max ? 10 : 0;
this.$root.$emit('update-fontsize', textsize);
},
getSupport(support) {
Loading