Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 8f216580 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

Ajout popup de débugage en mandarin

parent 190e41cd
......@@ -273,6 +273,8 @@ async function getColorisation() {
var linediv = document.createElement('div');
outputDiv.appendChild(linediv);
var tones = {1:'˥',2:'˧˥',3:'˨˩˦',4:'˥˩',5:''};
for (i=0; i<outText.length; i++) {
// Pour chaque mot outText[i]
var worddiv = document.createElement('div');
......@@ -296,7 +298,11 @@ async function getColorisation() {
outputDiv.appendChild(linediv);
} else {
if (phonList.length>0){
createZh(worddiv,zi,phonList.length,phonList,ton);
var svg = createZh(zi,phonList.length,phonList,ton);
var svgdiv = document.createElement('div');
svgdiv.title = `${pinyin}${ton}\n${api}`+tones[ton];
svgdiv.appendChild(svg);
worddiv.appendChild(svgdiv);
} else {
// Le contenu n'est pas colorisé : on met en gris sans cadre
var newEl = document.createElement('span');
......
......@@ -21,7 +21,7 @@
// create('中',3,["phon_ts_retr","phon_o","phon_n_maj"],"all")
function createZh(targetdiv,sin,sy,phonList,ton) {
function createZh(sin,sy,phonList,ton) {
// create the svg element
const svg1 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
......@@ -241,5 +241,5 @@ function createZh(targetdiv,sin,sy,phonList,ton) {
// attach container to document
targetdiv.appendChild(svg1);
return svg1;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment