private getter

This commit is contained in:
Jörn-Michael Miehe 2022-09-12 23:49:06 +00:00
parent 5a274de64f
commit f01cf0fbe0

View file

@ -18,7 +18,7 @@ export default class TickerBar extends Vue {
@Prop({ required: true }) @Prop({ required: true })
private readonly content!: string; private readonly content!: string;
get marqueeDuration(): string { private get marqueeDuration(): string {
// 10 seconds + another second per 7 chars // 10 seconds + another second per 7 chars
let dv = this.content ? Math.round(this.content.length / 7) : 0; let dv = this.content ? Math.round(this.content.length / 7) : 0;
return 10 + dv + "s"; return 10 + dv + "s";