diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-01-27 23:24:34 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-01-27 23:24:34 +0200 |
commit | dd019ecf687299b0d2238312de7c476b2a263107 (patch) | |
tree | 1d52735dd3e8128cf7e74e97bc54b857ec5c5f1b /ext/mixed | |
parent | 2dbb24ea0416cb83185b6f92624bd9b6e937eade (diff) |
fix audio index in resultOutputMode = 'merge'
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/display.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index c4be02f2..16bad3d9 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -176,7 +176,12 @@ class Display { const entry = link.closest('.entry'); const definitionIndex = this.entryIndexFind(entry); const expressionIndex = Display.indexOf(entry.querySelectorAll('.term-expression .action-play-audio'), link); - this.audioPlay(this.definitions[definitionIndex], expressionIndex, definitionIndex); + this.audioPlay( + this.definitions[definitionIndex], + // expressionIndex is used in audioPlay to detect result output mode + Math.max(expressionIndex, this.options.general.resultOutputMode === 'merge' ? 0 : -1), + definitionIndex + ); } onNoteAdd(e) { |