Changeset 35456 for main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/TranscriptionItemEditor.vue
- Timestamp:
- 2021-09-23T16:52:55+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/TranscriptionItemEditor.vue
r35455 r35456 20 20 </div> 21 21 22 <word-timing-selector :surroundingWords="surroundingWords" :word="selectedWord" :wordIndex="selectedIndex" />22 <word-timing-selector class="word-timing-selector" :surroundingWords="surroundingWords" :word="selectedWord" /> 23 23 24 24 <div class="editor-controls"> … … 60 60 61 61 .word-highlight-applied { 62 background-color: rgba(255, 255, 0, 0.4);62 background-color: var(--highlighted-word-bg); 63 63 } 64 64 … … 75 75 font-family: inherit; 76 76 font-size: 1rem; 77 } 78 79 .word-timing-selector { 80 margin: 0.5em auto; 77 81 } 78 82 </style> … … 171 175 } 172 176 173 const words = this.words.slice(min, max); 174 // words.splice(index - min, 1); // Remove the index word, as it is not a 'surrounding' word 175 176 return words; 177 return this.words.slice(min, max); 177 178 }, 178 179 /** … … 200 201 }, 201 202 onEditorFocus(index) { 202 const wordStartTime = this.words[index].startTime + 0.01; 203 this.$store.commit("playbackStateSetTime", { id: this.transcription.id, time: wordStartTime }); 203 if (this.playbackState.currentTime < this.words[index].startTime || this.playbackState.curentTime > this.words[index].endTime) { 204 const wordStartTime = this.words[index].startTime + 0.01; 205 this.$store.commit("playbackStateSetTime", { id: this.transcription.id, time: wordStartTime }); 206 } 207 204 208 this.selectedIndex = index; 205 209 },
Note:
See TracChangeset
for help on using the changeset viewer.