From 637d4a2087b9e93ccd47d689411887b6c40c3992 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 18 Jul 2021 13:43:11 -0400 Subject: Pronunciation template helper (#1840) * Rename field * Set up pronunication components * Fix documentation * Rename function * Update test dependencies * Fix constructor * Log errors * Add pronunciation helper * Add styleApplier argument to _getHtml/_normalizeHtml * Use getAttribute for 'class' to support namespaced elements (e.g. svg) * Update format name * Add optional tag * Update docs --- ext/js/display/display-generator.js | 2 +- ext/js/display/sandbox/pronunciation-generator.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/display') diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 2421b88a..11a0a9d3 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -477,7 +477,7 @@ class DisplayGenerator { this._createPitchAccentDisambiguations(n, exclusiveTerms, exclusiveReadings); n = node.querySelector('.pronunciation-downstep-notation-container'); - n.appendChild(this._pronunciationGenerator.createPronunciationDownstepNotation(position)); + n.appendChild(this._pronunciationGenerator.createPronunciationDownstepPosition(position)); n = node.querySelector('.pronunciation-text-container'); n.lang = 'ja'; diff --git a/ext/js/display/sandbox/pronunciation-generator.js b/ext/js/display/sandbox/pronunciation-generator.js index bab36add..3739e716 100644 --- a/ext/js/display/sandbox/pronunciation-generator.js +++ b/ext/js/display/sandbox/pronunciation-generator.js @@ -144,7 +144,7 @@ class PronunciationGenerator { return svg; } - createPronunciationDownstepNotation(downstepPosition) { + createPronunciationDownstepPosition(downstepPosition) { downstepPosition = `${downstepPosition}`; const n1 = document.createElement('span'); -- cgit v1.2.3