Commit d91414c7 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

ajout btn fullscreen + sort char phonographe zh

parent 3a206beb
......@@ -721,6 +721,16 @@ function openInNewTab() {
window.open(URL, '_blank')
}
function toggleFullScreen() {
if (document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen) {
document.exitFullscreen()
document.getElementById("toggleFullScreenBtn").innerHTML = `<path d="m 5.828,10.172 c -0.1952499,-0.195191 -0.5117501,-0.195191 -0.707,0 -2.6618502,1.94423 -4.096,6.322035 -4.096,1.328 0,-0.666666 -1,-0.666666 -1,0 v 3.975 c 0,0.276142 0.22385763,0.5 0.5,0.5 H 4.5 c 0.6666664,0 0.6666664,-1 0,-1 -5.04044252,0.686128 -0.5920511,-2.175949 1.328,-4.096 0.195191,-0.19525 0.195191,-0.51175 0,-0.707 z m 4.344,-4.344 c 0.19525,0.195191 0.51175,0.195191 0.707,0 2.66185,-1.9442299 4.096,-6.32203458 4.096,-1.328 0,0.6666664 1,0.6666664 1,0 V 0.525 c 0,-0.27614237 -0.223858,-0.5 -0.5,-0.5 H 11.5 c -0.666666,10e-9 -0.666666,1 0,1 5.040443,-0.68612773 0.592051,2.1759489 -1.328,4.096 -0.195191,0.1952499 -0.195191,0.5117501 0,0.707 z"/>`
} else {
document.documentElement.requestFullscreen();
document.getElementById("toggleFullScreenBtn").innerHTML = `<path d="m 0.20589831,15.794102 c 0.19525,0.195191 0.51175,0.195191 0.707,0 2.66184999,-1.94423 4.09599999,-6.3220349 4.09599999,-1.328 0,0.666666 1,0.666666 1,0 v -3.975 c 0,-0.276143 -0.223858,-0.5000003 -0.5,-0.5000003 h -3.975 c -0.66666599,0 -0.66666599,1.0000003 0,1.0000003 5.040443,-0.686128 0.592051,2.175949 -1.32799999,4.096 -0.195191,0.19525 -0.195191,0.51175 0,0.707 z" />
<path d="m 15.709659,0.29034053 c -0.19525,-0.195191 -0.511749,-0.195191 -0.706999,0 -2.66185,1.94422997 -4.096,6.32203517 -4.096,1.32799997 0,-0.66666597 -1.0000002,-0.66666597 -1.0000002,0 v 3.9750003 c 0,0.276143 0.2238582,0.5000003 0.5000002,0.5000003 h 3.975 c 0.666666,0 0.666666,-1.0000004 0,-1.0000004 -5.0404432,0.6861281 -0.592051,-2.1759492 1.327999,-4.09600017 0.195191,-0.19525 0.195191,-0.51175 0,-0.707 z" />`
}
}
///////////////////////////////////
......@@ -854,9 +864,11 @@ function getChars(api) {
if (x in syllonAPI2pinyin && syllonAPI2pinyin[x]+y in syll2chars) {
var pinyin = syllonAPI2pinyin[x]+y;
var chars = syll2chars[pinyin];
for(var char in chars) {
charlist.push(char);
freqlist.push(chars[char]);
var keys = Object.keys(chars);
keys.sort();
for(var char=0; char<keys.length; char++) {
charlist.push(keys[char]);
freqlist.push(chars[keys[char]]);
}
}
return [charlist, freqlist]
......@@ -975,9 +987,8 @@ let listvoyelles = [
'rect_e_maj',
'rect_wo',
'rect_m_maj7',
'rect_7rho',
'rect_arho',
'rect_rho'
'rect_7_rho',
'rect_a_rho'
]
let listtonales = [
......
......@@ -21,8 +21,8 @@ var phon2api = {
"phon_a_maj_nas":"ɑ̃",
"phon_arobase":"ə",
"phon_arobase_rho":"ɚ",
"phon_arho":"",
"phon_7rho":"ɤ˞",
"phon_a_rho":"",
"phon_7_rho":"ɤ˞",
"phon_arobase_slash":"ɘ",
"phon_b":"b",
"phon_b_chev":"ɓ",
......@@ -104,7 +104,7 @@ var phon2api = {
"phon_r_retr":"ɽ",
"phon_r_slash":"ɹ",
"phon_r_slash_retr":"ɻ",
"phon_rho":"r",
"phon_rho":"˞",
"phon_s":"s",
"phon_s_chev2":"",
"phon_s_maj":"ʃ",
......
......@@ -21,50 +21,50 @@ var syll2chars = {
"": 1
},
"ling2": {
"0": 6,
"": 1,
"": 1,
"": 334,
"": 124,
"": 22,
"": 16,
"": 139,
"": 82,
"": 11,
"0": 6,
"": 4,
"": 51,
"": 21,
"": 78,
"": 8,
"": 51,
"": 1,
"": 7,
"": 14,
"": 1,
"": 1,
"": 20,
"": 12,
"": 1,
"": 1,
"": 2,
"": 9,
"": 1,
"": 3,
"": 22,
"": 2,
"": 6,
"": 4,
"": 1,
"": 2,
"": 12,
"": 6,
"": 5,
"": 3,
"": 11,
"": 16,
"": 1,
"": 1,
"": 8,
"": 1,
"": 1,
"": 3,
"": 1,
"": 82,
"": 139,
"": 124,
"": 1,
"": 1,
"": 1,
"": 334,
"": 14,
"": 20,
"": 78,
"": 1
},
"yi1": {
......@@ -1732,6 +1732,7 @@ var syll2chars = {
"": 1
},
"si4": {
"4": 1,
"": 1,
"": 1,
"": 423,
......@@ -1762,6 +1763,7 @@ var syll2chars = {
"": 2
},
"qi1": {
"7":1,
"": 1,
"": 1,
"": 43,
......
......@@ -208,8 +208,12 @@ var langJson = {
"fr": "Changer de liste des graphies",
"en": "Choose the spelling list",
"zh": "Changer de liste des graphies"
},
"ti_toggleFullScreen": {
"fr": "Mode plein écran",
"en": "Full screen mode",
"zh": ""
}
}
\ No newline at end of file
......@@ -1859,7 +1859,7 @@
class="svgPhonClick"
onclick="top.zhPhon(this.id)"
transform="translate(-17.7538,-8.5905475)"
id="rect_arho">
id="rect_a_rho">
<rect
style="fill:url(#gradient_arho);stroke-width:1.22834826"
id="rect275"
......@@ -1882,7 +1882,7 @@
class="svgPhonClick"
onclick="top.zhPhon(this.id)"
transform="translate(-121.81137,32.063595)"
id="rect_7rho">
id="rect_7_rho">
<rect
y="286.67853"
x="374.68451"
......
......@@ -83,6 +83,15 @@
<button type="button" class="btn btn-secondary langtitle" onclick="putAnchorOnLast()" id="ti_last"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-chevron-bar-right nobg btnSvg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0zM11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5z"/></svg></button>
</div>
<button type="button" class="btn btn-danger" onclick="eraseAll()"><span id="sp_btneraseall" class="langspan"></span></button>
<button type="button" class="btn btn-light langtitle" id="ti_toggleFullScreen" onclick="toggleFullScreen()" style="padding:5px 7px">
<svg id="toggleFullScreenBtn" xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-arrows-fullscreen" viewBox="0 0 16 16">
<!-- ENTER FULLSCREEN -->
<path d="m 5.828,10.172 c -0.1952499,-0.195191 -0.5117501,-0.195191 -0.707,0 -2.6618502,1.94423 -4.096,6.322035 -4.096,1.328 0,-0.666666 -1,-0.666666 -1,0 v 3.975 c 0,0.276142 0.22385763,0.5 0.5,0.5 H 4.5 c 0.6666664,0 0.6666664,-1 0,-1 -5.04044252,0.686128 -0.5920511,-2.175949 1.328,-4.096 0.195191,-0.19525 0.195191,-0.51175 0,-0.707 z m 4.344,-4.344 c 0.19525,0.195191 0.51175,0.195191 0.707,0 2.66185,-1.9442299 4.096,-6.32203458 4.096,-1.328 0,0.6666664 1,0.6666664 1,0 V 0.525 c 0,-0.27614237 -0.223858,-0.5 -0.5,-0.5 H 11.5 c -0.666666,10e-9 -0.666666,1 0,1 5.040443,-0.68612773 0.592051,2.1759489 -1.328,4.096 -0.195191,0.1952499 -0.195191,0.5117501 0,0.707 z"/>
<!-- EXIT FULLSCREEN -->
<!-- <path d="m 0.20589831,15.794102 c 0.19525,0.195191 0.51175,0.195191 0.707,0 2.66184999,-1.94423 4.09599999,-6.3220349 4.09599999,-1.328 0,0.666666 1,0.666666 1,0 v -3.975 c 0,-0.276143 -0.223858,-0.5000003 -0.5,-0.5000003 h -3.975 c -0.66666599,0 -0.66666599,1.0000003 0,1.0000003 5.040443,-0.686128 0.592051,2.175949 -1.32799999,4.096 -0.195191,0.19525 -0.195191,0.51175 0,0.707 z" />
<path d="m 15.709659,0.29034053 c -0.19525,-0.195191 -0.511749,-0.195191 -0.706999,0 -2.66185,1.94422997 -4.096,6.32203517 -4.096,1.32799997 0,-0.66666597 -1.0000002,-0.66666597 -1.0000002,0 v 3.9750003 c 0,0.276143 0.2238582,0.5000003 0.5000002,0.5000003 h 3.975 c 0.666666,0 0.666666,-1.0000004 0,-1.0000004 -5.0404432,0.6861281 -0.592051,-2.1759492 1.327999,-4.09600017 0.195191,-0.19525 0.195191,-0.51175 0,-0.707 z" /> -->
</svg>
</button>
<div class="form-check form-switch mx-2 fs-4">
<input class="form-check-input" type="checkbox" id="modePhono" onchange="switchMode()" checked>
<label class="form-check-label" for="modePhono">Mode Graphies</label>
......
Supports Markdown
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