Ignore:
Timestamp:
2021-09-20T10:06:23+12:00 (3 years ago)
Author:
cstephen
Message:

Improve audio time bar implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/AudioTimeBar.vue

    r35413 r35426  
    11<template>
    22<div class="root">
    3     <input type="range" class="slider-continuous" v-model="sliderValue" :max="audioLength" step="0.01" />
    4     <span>{{ sliderValue }}</span>
     3    <input type="range" class="slider-continuous" v-model.number="sliderValue" :max="audioLength" step="0.01" />
     4    <span>{{ stringSliderValue }}</span>
    55</div>
    66</template>
     
    3232        sliderValue: {
    3333            get() {
    34                 if (this.myValue < 0) {
     34                if (this.modelValue < 0) {
    3535                    return 0;
    3636                }
    3737
    38                 if (this.myValue > this.audioLength) {
     38                if (this.modelValue > this.audioLength) {
    3939                    return this.audioLength;
    4040                }
    4141
    42                 return this.myValue;
     42                return this.modelValue;
    4343            },
    4444            set(newValue) {
     45                // this.myValue = newValue;
    4546                this.$emit("update:modelValue", newValue);
    46                 this.myValue = newValue;
    4747            }
    4848        },
    4949        stringSliderValue() {
    50             return Util.formatSecondsTimeString(this.sliderValue);
     50            return Util.formatSecondsTimeString(this.sliderValue, false, 2);
    5151        }
    5252    }
Note: See TracChangeset for help on using the changeset viewer.