Correct space

preferencesAboutTextFull
Artem Proskurnev 3 years ago
parent f342e36f70
commit 378664e3fc
  1. 76
      resources/library/applications/GraphMe.wgt/Grapheur.html
  2. 64
      resources/library/applications/GraphMe.wgt/JavaScript/Languages.js

@ -66,12 +66,12 @@
</span> </span>
</span> </span>
</div> </div>
<!-- Onglet3D --> <!-- Onglet3D -->
<div id="onglet3D" onclick="activer3D()"> <div id="onglet3D" onclick="activer3D()">
3D 3D
</div> </div>
<!-- Mini-boutons --> <!-- Mini-boutons -->
<div id="topRightButtons"> <div id="topRightButtons">
<div id="boutonSaveGraph" title="Save" class="miniBouton" onclick="afficherMenu('menuSaveGraph')">S</div> <div id="boutonSaveGraph" title="Save" class="miniBouton" onclick="afficherMenu('menuSaveGraph')">S</div>
@ -87,13 +87,13 @@
<div id="affichage"></div> <div id="affichage"></div>
<div id="affichageOutils"></div> <div id="affichageOutils"></div>
</div> </div>
<div id="divInputRapide"> <div id="divInputRapide">
f(x) = f(x) =
<input type="text" id="inputRapide" onkeypress="if(event.keyCode == 13) widget.addStartFunction()"/> <input type="text" id="inputRapide" onkeypress="if(event.keyCode == 13) widget.addStartFunction()"/>
<input id="inputRapideButton" type="button" value="Display" onclick="widget.addStartFunction()"/> <input id="inputRapideButton" type="button" value="Display" onclick="widget.addStartFunction()"/>
</div> </div>
<div id="zoneJoystick"> <div id="zoneJoystick">
<div id="joystick" onclick=""> <div id="joystick" onclick="">
<table> <table>
@ -116,11 +116,11 @@
</div> </div>
<div id="boutonJoystick" onclick=""></div> <div id="boutonJoystick" onclick=""></div>
</div> </div>
<div id="zoomButtons"> <div id="zoomButtons">
<div id="zoomOut" class="toolButton zoomButton" onclick="affichage.zoom(1.25)">-</div><div id="zoomIn" class="toolButton zoomButton" onclick="affichage.zoom(0.8)">+</div> <div id="zoomOut" class="toolButton zoomButton" onclick="affichage.zoom(1.25)">-</div><div id="zoomIn" class="toolButton zoomButton" onclick="affichage.zoom(0.8)">+</div>
</div> </div>
<div id="toolButtons"> <div id="toolButtons">
<div id="pointTool" title="Point tool" class="toolButton selectedTool" onclick="outil.choisir('point')">·</div> <div id="pointTool" title="Point tool" class="toolButton selectedTool" onclick="outil.choisir('point')">·</div>
<div id="moveTool" title="Move tool" class="toolButton" onclick="outil.choisir('deplacement')"><div class="icon"></div></div> <div id="moveTool" title="Move tool" class="toolButton" onclick="outil.choisir('deplacement')"><div class="icon"></div></div>
@ -129,7 +129,7 @@
<!-- ..... Menus ..... --> <!-- ..... Menus ..... -->
<!-- Menu d'exemple --> <!-- Menu d'exemple -->
<div id="menuExemple" class="menu"> <div id="menuExemple" class="menu">
<div class="contenuMenu"></div> <div class="contenuMenu"></div>
@ -137,7 +137,7 @@
<input id="menuExempleCloseButton" type="button" onclick="cacherMenu()" value="Close"/> <input id="menuExempleCloseButton" type="button" onclick="cacherMenu()" value="Close"/>
</div></div></div> </div></div></div>
</div> </div>
<!-- GraphMe --> <!-- GraphMe -->
<div id="menuGraphMe" class="menu"> <div id="menuGraphMe" class="menu">
<div class="ongletMenu deuxOnglets"> <div class="ongletMenu deuxOnglets">
@ -177,7 +177,7 @@
<br/> <br/>
<input type="button" onclick="afficherMenu(dernierMenu)" value="Ok"/> <input type="button" onclick="afficherMenu(dernierMenu)" value="Ok"/>
</div> </div>
<!-- Crédits --> <!-- Crédits -->
<div id="menuCredits" class="menu"> <div id="menuCredits" class="menu">
<div class="ongletMenu deuxOnglets"> <div class="ongletMenu deuxOnglets">
@ -189,7 +189,7 @@
<tr> <tr>
<td> <td>
<img src="icon.png"/> <img src="icon.png"/>
<h3 id="widgetDevelopedBy">Widget developed by</h3> <h3 id="widgetDevelopedBy">Widget developed by</h3>
Yannick Vessaz <br/> Yannick Vessaz <br/>
<a href='mailto:yannick.vessaz@gmail.com'>yannick.vessaz@gmail.com</a><br/> <a href='mailto:yannick.vessaz@gmail.com'>yannick.vessaz@gmail.com</a><br/>
<a href='https://yannick.vessaz.net/GraphMe'>https://yannick.vessaz.net/GraphMe</a> <a href='https://yannick.vessaz.net/GraphMe'>https://yannick.vessaz.net/GraphMe</a>
@ -226,7 +226,7 @@
<input type="button" id="menuChangelogCloseButton" class="bouton" onclick="cacherMenu()" value="Close"/> <input type="button" id="menuChangelogCloseButton" class="bouton" onclick="cacherMenu()" value="Close"/>
</div></div></div> </div></div></div>
</div> </div>
<!-- Affichage --> <!-- Affichage -->
<div id="menuAffichage" class="menu"> <div id="menuAffichage" class="menu">
<div class="ongletMenu deuxOnglets"> <div class="ongletMenu deuxOnglets">
@ -252,11 +252,11 @@
<br/>Zoom: <br/> <br/>Zoom: <br/>
<input type="button" class="bouton" style="width:30px;" onclick='affichage.zoom(1.25)' value="-"/><input type="button" class="bouton" style="width:30px; position:relative; left: 9px;" onclick='affichage.zoom(0.8)' value="+"/><br/> <input type="button" class="bouton" style="width:30px;" onclick='affichage.zoom(1.25)' value="-"/><input type="button" class="bouton" style="width:30px; position:relative; left: 9px;" onclick='affichage.zoom(0.8)' value="+"/><br/>
<br/> <br/>
<span id="defaultZoom">Default zoom</span> : <span id="defaultZoom">Default zoom</span> :
<input value="3.7" class="smallInput" id="zoomDefaut"/> <input value="3.7" class="smallInput" id="zoomDefaut"/>
<input type="button" id="defaultDisplayParameters" onclick="affichage.initZoom2(document.getElementById('zoomDefaut').value)" value="Default display parameters"/> <input type="button" id="defaultDisplayParameters" onclick="affichage.initZoom2(document.getElementById('zoomDefaut').value)" value="Default display parameters"/>
<br/><br/><br/><br/> <br/><br/><br/><br/>
</td> </td>
<td> <td>
<h4 id="displayOptions">Options</h4> <h4 id="displayOptions">Options</h4>
@ -282,7 +282,7 @@
<input type="button" id="menuAffichageOkButton" class="bouton" onclick='cacherMenu(); actualiserGraph()' value="Ok"/> <input type="button" id="menuAffichageOkButton" class="bouton" onclick='cacherMenu(); actualiserGraph()' value="Ok"/>
</div></div></div> </div></div></div>
</div> </div>
<div id="menuFunctionParameters" class="menu"> <div id="menuFunctionParameters" class="menu">
<div class="ongletMenu deuxOnglets"> <div class="ongletMenu deuxOnglets">
<span id="menuFunctionParametersDisplayParametersTab" onclick='afficherMenu("menuAffichage")'>Display parameters</span> <span id="menuFunctionParametersDisplayParametersTab" onclick='afficherMenu("menuAffichage")'>Display parameters</span>
@ -298,7 +298,7 @@
<br/><br/> <br/><br/>
<input type="checkbox" id="checkAire" onchange="actualiserGraph()"/><label for="checkAire"> <span id="drawArea">Draw area under function</span></label><br/> <input type="checkbox" id="checkAire" onchange="actualiserGraph()"/><label for="checkAire"> <span id="drawArea">Draw area under function</span></label><br/>
<br/> <br/>
<span id="lineStyle">Line style</span> : <span id="lineStyle">Line style</span> :
<select id="selectStyle" onchange="actualiserGraph()"> <select id="selectStyle" onchange="actualiserGraph()">
<option id="selectStyleLine" value="continu">line</option> <option id="selectStyleLine" value="continu">line</option>
<option id="selectStyleDotted" value="points">dotted</option> <option id="selectStyleDotted" value="points">dotted</option>
@ -315,7 +315,7 @@
<span id="display3D" class="ongletMenuActuel">3D Display</span> <span id="display3D" class="ongletMenuActuel">3D Display</span>
</div> </div>
<div class="contenuMenu"> <div class="contenuMenu">
<span id="displayStyle">Display style</span> : <span id="displayStyle">Display style</span> :
<select id="selectAffichage3D" onchange="actualiserGraph()"> <select id="selectAffichage3D" onchange="actualiserGraph()">
<option id="displayStyleSurfaces" value="surfaces">surfaces</option> <option id="displayStyleSurfaces" value="surfaces">surfaces</option>
<option id="displayStyleDotted" value="points">dotted</option> <option id="displayStyleDotted" value="points">dotted</option>
@ -428,7 +428,7 @@
<li><span class="gras">round(x)</span> -> <span id="roundText">round to the nearest integer</span></li> <li><span class="gras">round(x)</span> -> <span id="roundText">round to the nearest integer</span></li>
<li><span class="gras">ceil(x)</span> -> <span id="ceilText">round to the first integer bigger than x</span></li> <li><span class="gras">ceil(x)</span> -> <span id="ceilText">round to the first integer bigger than x</span></li>
<li><span class="gras">floor(x)</span> -> <span id="floorText">round to the first integer lower than x</span></li> <li><span class="gras">floor(x)</span> -> <span id="floorText">round to the first integer lower than x</span></li>
</ul> </ul>
</p> <br/> </p> <br/>
<hr/> <hr/>
<h1 id="constants">Constants</h1> <h1 id="constants">Constants</h1>
@ -523,10 +523,10 @@
<p class="gras"> <p class="gras">
f(x) = <span id="etudeFdeX">...</span> f(x) = <span id="etudeFdeX">...</span>
</p> </p>
<p><span id="domainOfDefinition" class="gras">Domain of definition</span> : <p><span id="domainOfDefinition" class="gras">Domain of definition</span> :
<span id="etudeEDF">...</span> <span id="etudeEDF">...</span>
</p> </p>
<p><span id="symmetry" class="gras">Symmetry</span> : <p><span id="symmetry" class="gras">Symmetry</span> :
<span id="etudeParite">...</span> <span id="etudeParite">...</span>
</p> </p>
<p><span id="zeros" class="gras">Zeros</span> : <p><span id="zeros" class="gras">Zeros</span> :
@ -550,7 +550,7 @@
<br/> <br/>
<br/> <br/>
</div> </div>
<div class="barreBasMenu"><div><div> <div class="barreBasMenu"><div><div>
<!-- <input type="button" class="bouton" onclick="etude.etudier(document.getElementById('input').value)" value="Actualiser" style="position:relative;right:310px;"/> --> <!-- <input type="button" class="bouton" onclick="etude.etudier(document.getElementById('input').value)" value="Actualiser" style="position:relative;right:310px;"/> -->
<input type="button" id="menuEtudeBackButton" class="bouton" onclick="afficherMenu(dernierMenu)" style="position: absolute; left: 0px;" value="Back"/> <input type="button" id="menuEtudeBackButton" class="bouton" onclick="afficherMenu(dernierMenu)" style="position: absolute; left: 0px;" value="Back"/>
@ -606,7 +606,7 @@
<br/> <br/>
</div> </div>
<div id="editeurStyleDiv"> <div id="editeurStyleDiv">
<span id="editorLineStyle">Style</span> : <span id="editorLineStyle">Style</span> :
<select id="editeurStyle" onchange="editeur.getOptions()"> <select id="editeurStyle" onchange="editeur.getOptions()">
<option id="editorStyleLine" value="continu">line</option> <option id="editorStyleLine" value="continu">line</option>
<option id="editorStyleDotted" value="points">dotted</option> <option id="editorStyleDotted" value="points">dotted</option>
@ -666,14 +666,14 @@
<input id="implicitInput" placeholder="x^2 + y^2 = 9" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/> <input id="implicitInput" placeholder="x^2 + y^2 = 9" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/>
</span> </span>
<span id="polarDiv" style="display:none"> <span id="polarDiv" style="display:none">
r(t) = r(t) =
<input id="polarInput" placeholder="t" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/> <input id="polarInput" placeholder="t" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/>
</span> </span>
<span id="parametricDiv" style="display:none"> <span id="parametricDiv" style="display:none">
x(t) = x(t) =
<input id="parametricInputX" placeholder="cos(t)" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) document.getElementById('parametricInputY').focus()"/> <input id="parametricInputX" placeholder="cos(t)" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) document.getElementById('parametricInputY').focus()"/>
<br/> <br/>
y(t) = y(t) =
<input id="parametricInputY" placeholder="sin(t)" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/> <input id="parametricInputY" placeholder="sin(t)" style="width:220px; position:relative; right:2px;" onkeypress="if(event.keyCode == 13) fct.ajouter()"/>
</span> </span>
<input type="button" id="addFunctionButton" value="Add" onclick="fct.ajouter();"/> <input type="button" id="addFunctionButton" value="Add" onclick="fct.ajouter();"/>
@ -687,7 +687,7 @@
<input type="button" id="menuFonctionsCloseButton" class="bouton" onclick="cacherMenu()" value="Close"/> <input type="button" id="menuFonctionsCloseButton" class="bouton" onclick="cacherMenu()" value="Close"/>
</div></div></div> </div></div></div>
</div> </div>
<!-- Fonctions 3D --> <!-- Fonctions 3D -->
<div id="menuFonctions3D" style="display:none;"> <div id="menuFonctions3D" style="display:none;">
f(x,y) = f(x,y) =
@ -719,7 +719,7 @@
<br/> <br/>
<canvas id="canvasSV" onmousemove="colorPicker.moveSV(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveSV(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas> <canvas id="canvasSV" onmousemove="colorPicker.moveSV(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveSV(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas>
<canvas id="canvasT" onmousemove="colorPicker.moveT(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveT(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas> <canvas id="canvasT" onmousemove="colorPicker.moveT(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveT(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas>
<table id="colorValues"> <table id="colorValues">
<tr> <tr>
<td><span id="colorPickerColor">Color</span> : </td><td><input id="inputTeinte" class="smallInput" value="0" onchange="colorPicker.recupererInputs()"/></td> <td><span id="colorPickerColor">Color</span> : </td><td><input id="inputTeinte" class="smallInput" value="0" onchange="colorPicker.recupererInputs()"/></td>
@ -739,9 +739,9 @@
<td><input id="inputCouleur" style="width: 70%" value="cyan" onkeypress="fct.couleur = this.value; if(event.keyCode==13) actualiserGraph()"/></td> <td><input id="inputCouleur" style="width: 70%" value="cyan" onkeypress="fct.couleur = this.value; if(event.keyCode==13) actualiserGraph()"/></td>
</tr>--> </tr>-->
</table> </table>
<div id="apercuCouleur" title="New color"></div><div id="apercuCouleur2" title="Old color"></div> <div id="apercuCouleur" title="New color"></div><div id="apercuCouleur2" title="Old color"></div>
<br/> <br/>
<canvas id="canvasO" onmousemove="colorPicker.moveO(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveO(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas> <canvas id="canvasO" onmousemove="colorPicker.moveO(event)" onmousedown="colorPicker.sourisClick(this.id); colorPicker.moveO(event)" onmouseup="colorPicker.sourisUp()" onmouseover="colorPicker.sourisOver(this.id)" onmouseout="colorPicker.sourisOut()"></canvas>
</div> </div>
@ -749,7 +749,7 @@
<input type="button" id="colorPickerCancelButton" class="bouton" onclick="cacherMenu()" value="Cancel"/><input type="button" id="colorPickerOkButton" class="bouton" onclick="colorPicker.fermer()" value="Ok"/> <input type="button" id="colorPickerCancelButton" class="bouton" onclick="cacherMenu()" value="Cancel"/><input type="button" id="colorPickerOkButton" class="bouton" onclick="colorPicker.fermer()" value="Ok"/>
</div></div></div> </div></div></div>
</div> </div>
<!-- Save image --> <!-- Save image -->
<div id="menuSaveImage" class="menu"> <div id="menuSaveImage" class="menu">
<div class="ongletMenu deuxOnglets"> <div class="ongletMenu deuxOnglets">
@ -866,10 +866,10 @@
<div class="flecheDeplacement" id="flecheGauche" onclick="affichage.deplacerX(-1)" onmousemove="souris.move(event)"></div> <div class="flecheDeplacement" id="flecheGauche" onclick="affichage.deplacerX(-1)" onmousemove="souris.move(event)"></div>
<div class="flecheDeplacement" id="flecheBas" onclick="if(fonction3D){display3D.zoom(0.8)}else{affichage.deplacerY(-1)}" onmousemove="souris.move(event)"></div> <div class="flecheDeplacement" id="flecheBas" onclick="if(fonction3D){display3D.zoom(0.8)}else{affichage.deplacerY(-1)}" onmousemove="souris.move(event)"></div>
<div class="flecheDeplacement" id="flecheDroite" onclick="affichage.deplacerX(1)" onmousemove="souris.move(event)"></div> <div class="flecheDeplacement" id="flecheDroite" onclick="affichage.deplacerX(1)" onmousemove="souris.move(event)"></div>
<!-- .... Add SVG display script .... --> <!-- .... Add SVG display script .... -->
<embed id="embedSVG" src="JavaScript/AffichageSVG.svg" type="image/svg+xml" style="position:absolute; display:none; z-index: -1;"/> <embed id="embedSVG" src="JavaScript/AffichageSVG.svg" type="image/svg+xml" style="position:absolute; display:none; z-index: -1;"/>
</div> </div>
</td> </td>
<td id="background-right" class="background-border-y"></td> <td id="background-right" class="background-border-y"></td>
@ -888,33 +888,33 @@
<label for="ctxAxes" id="ctxMenuAxes">Axes</label> <label for="ctxAxes" id="ctxMenuAxes">Axes</label>
<div class="miniCouleur" id="ctxCouleurAxes" style="background-color:rgba(0,0,0,0.5)" title="affichage.couleurAxes" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div> <div class="miniCouleur" id="ctxCouleurAxes" style="background-color:rgba(0,0,0,0.5)" title="affichage.couleurAxes" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div>
<br/> <br/>
<input type="checkbox" id="ctxEchelle" checked="checked" onchange="affichage.echelle = this.checked ? true : false ; affichage.dessiner()"/> <input type="checkbox" id="ctxEchelle" checked="checked" onchange="affichage.echelle = this.checked ? true : false ; affichage.dessiner()"/>
<label for="ctxEchelle" id="ctxMenuScale">Scale</label> <label for="ctxEchelle" id="ctxMenuScale">Scale</label>
<div class="miniCouleur" id="ctxCouleurEchelle" style="background-color:rgba(255,255,255,1)" title="affichage.couleurEchelle" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div> <div class="miniCouleur" id="ctxCouleurEchelle" style="background-color:rgba(255,255,255,1)" title="affichage.couleurEchelle" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div>
<br/> <br/>
<input type="checkbox" id="ctxGrille" checked="checked" onchange="affichage.grille = this.checked ? true : false ; affichage.dessiner()"/> <input type="checkbox" id="ctxGrille" checked="checked" onchange="affichage.grille = this.checked ? true : false ; affichage.dessiner()"/>
<label for="ctxGrille" id="ctxMenuGrid">Grid</label> <label for="ctxGrille" id="ctxMenuGrid">Grid</label>
<div class="miniCouleur" id="ctxCouleurGrille" style="background-color:rgba(255,255,255,0.1)" title="affichage.couleurGrille" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div> <div class="miniCouleur" id="ctxCouleurGrille" style="background-color:rgba(255,255,255,0.1)" title="affichage.couleurGrille" onclick="colorPicker.init(this.id); afficherMenu('menuCouleur'); ctxMenu.fermer()"></div>
<br/> <br/>
<input type="button" id="ctxMenuReset" class="bouton" value="Reset" onclick="affichage.initZoom2(document.getElementById('zoomDefaut').value); ctxMenu.fermer()"/> <input type="button" id="ctxMenuReset" class="bouton" value="Reset" onclick="affichage.initZoom2(document.getElementById('zoomDefaut').value); ctxMenu.fermer()"/>
<br/> <br/>
<input type="button" id="ctxMenuSave" class="bouton" value="Save" onclick="afficherMenu('menuSaveGraph'); ctxMenu.fermer()"/> <input type="button" id="ctxMenuSave" class="bouton" value="Save" onclick="afficherMenu('menuSaveGraph'); ctxMenu.fermer()"/>
<div class="fermer" onclick="ctxMenu.fermer();">x</div> <div class="fermer" onclick="ctxMenu.fermer();">x</div>
</div> </div>
<!-- Boutons de suppression des points et des ronds ajoutés --> <!-- Boutons de suppression des points et des ronds ajoutés -->
<span id="divSuppOutil"></span> <span id="divSuppOutil"></span>
<!-- Messages d'aide --> <!-- Messages d'aide -->
<div id="divMessages"></div> <div id="divMessages"></div>
<!-- .... Setup translations .... --> <!-- .... Setup translations .... -->
<script type="text/javascript">languages.init();</script> <script type="text/javascript">languages.init();</script>
</body> </body>
<!-- Widget made by Yannick Vessaz --> <!-- Widget made by Yannick Vessaz -->
<!-- E-mail: yannick.vessaz@gmail.com --> <!-- E-mail: yannick.vessaz@gmail.com -->

@ -1,7 +1,7 @@
var languages = { var languages = {
current: "en", current: "en",
init: function(){ init: function(){
var lang = this.navigatorLanguage(); var lang = this.navigatorLanguage();
if(lang){ if(lang){
@ -9,41 +9,41 @@ var languages = {
this.set(lang); this.set(lang);
} }
}, },
navigatorLanguage: function(){ navigatorLanguage: function(){
if(window.sankore){ if(window.sankore){
return sankore.locale(); return sankore.locale();
} }
return navigator.language || navigator.userLanguage; return navigator.language || navigator.userLanguage;
}, },
set: function(lang){ set: function(lang){
if(lang in langTexts){ if(lang in langTexts){
this.current = lang; this.current = lang;
this.setTexts(langTexts[lang]); this.setTexts(langTexts[lang]);
} }
}, },
getText: function(id){ getText: function(id){
return langTexts[this.current][id]; return langTexts[this.current][id];
}, },
setTexts: function(texts){ setTexts: function(texts){
this.id("graphMeButton").textContent = texts.widgetName; this.id("graphMeButton").textContent = texts.widgetName;
this.id("functionsButton").textContent = texts.functions; this.id("functionsButton").textContent = texts.functions;
this.id("displayButton").textContent = texts.display; this.id("displayButton").textContent = texts.display;
this.id("helpButton").textContent = texts.help; this.id("helpButton").textContent = texts.help;
this.id("boutonAgrandir").title = texts.fullscreen; this.id("boutonAgrandir").title = texts.fullscreen;
this.id("boutonSaveGraph").title = texts.save; this.id("boutonSaveGraph").title = texts.save;
this.id("inputRapideButton").value = texts.displayAction; this.id("inputRapideButton").value = texts.displayAction;
this.id("pointTool").title = texts.pointTool; this.id("pointTool").title = texts.pointTool;
this.id("moveTool").title = texts.moveTool; this.id("moveTool").title = texts.moveTool;
this.id("tangentTool").title = texts.tangentTool; this.id("tangentTool").title = texts.tangentTool;
this.id("menuExempleCloseButton").value = texts.close; this.id("menuExempleCloseButton").value = texts.close;
this.id("menuGraphMeOptionsTab").textContent = texts.options; this.id("menuGraphMeOptionsTab").textContent = texts.options;
this.id("menuGraphMeAboutTab").textContent = texts.about; this.id("menuGraphMeAboutTab").textContent = texts.about;
this.id("widgetOptions").textContent = texts.widgetOptions; this.id("widgetOptions").textContent = texts.widgetOptions;
@ -55,7 +55,7 @@ var languages = {
this.id("resetWidgetButton").value = texts.resetWidget; this.id("resetWidgetButton").value = texts.resetWidget;
this.id("checkForUpdateButton").value = texts.checkForUpdate; this.id("checkForUpdateButton").value = texts.checkForUpdate;
this.id("menuGraphMeCloseButton").value = texts.close; this.id("menuGraphMeCloseButton").value = texts.close;
this.id("menuCreditsOptionsTab").textContent = texts.options; this.id("menuCreditsOptionsTab").textContent = texts.options;
this.id("menuCreditsAboutTab").textContent = texts.about; this.id("menuCreditsAboutTab").textContent = texts.about;
this.id("widgetDevelopedBy").textContent = texts.widgetDevelopedBy; this.id("widgetDevelopedBy").textContent = texts.widgetDevelopedBy;
@ -63,11 +63,11 @@ var languages = {
this.id("widgetBackgroundSource").textContent = texts.widgetBackgroundSource; this.id("widgetBackgroundSource").textContent = texts.widgetBackgroundSource;
this.id("changelogButton").textContent = texts.changelogButton; this.id("changelogButton").textContent = texts.changelogButton;
this.id("menuCreditsCloseButton").value = texts.close; this.id("menuCreditsCloseButton").value = texts.close;
this.id("changelogTitle").textContent = texts.changelogTitle; this.id("changelogTitle").textContent = texts.changelogTitle;
this.id("menuChangelogBackButton").value = texts.back; this.id("menuChangelogBackButton").value = texts.back;
this.id("menuChangelogCloseButton").value = texts.close; this.id("menuChangelogCloseButton").value = texts.close;
this.id("menuAffichageDisplayParametersTab").textContent = texts.displayParameters; this.id("menuAffichageDisplayParametersTab").textContent = texts.displayParameters;
this.id("menuAffichageFunctionsParametersTab").textContent = texts.functionsParameters; this.id("menuAffichageFunctionsParametersTab").textContent = texts.functionsParameters;
this.id("plotRange").textContent = texts.plotRange; this.id("plotRange").textContent = texts.plotRange;
@ -85,7 +85,7 @@ var languages = {
this.id("graphAccuracy").textContent = texts.graphAccuracy; this.id("graphAccuracy").textContent = texts.graphAccuracy;
this.id("improveAccuracy").textContent = texts.improveAccuracy; this.id("improveAccuracy").textContent = texts.improveAccuracy;
this.id("menuAffichageOkButton").value = texts.ok; this.id("menuAffichageOkButton").value = texts.ok;
this.id("menuFunctionParametersDisplayParametersTab").textContent = texts.displayParameters; this.id("menuFunctionParametersDisplayParametersTab").textContent = texts.displayParameters;
this.id("menuFunctionParametersFunctionsParametersTab").textContent = texts.functionsParameters; this.id("menuFunctionParametersFunctionsParametersTab").textContent = texts.functionsParameters;
this.id("defaultFunctionParameters").textContent = texts.defaultFunctionParameters; this.id("defaultFunctionParameters").textContent = texts.defaultFunctionParameters;
@ -97,7 +97,7 @@ var languages = {
this.id("selectStyleDotted").textContent = texts.styleDotted; this.id("selectStyleDotted").textContent = texts.styleDotted;
this.id("selectStyleDashed").textContent = texts.styleDashed; this.id("selectStyleDashed").textContent = texts.styleDashed;
this.id("menuFunctionParametersCloseButton").value = texts.close; this.id("menuFunctionParametersCloseButton").value = texts.close;
this.id("display3D").textContent = texts.display3D; this.id("display3D").textContent = texts.display3D;
this.id("displayStyle").textContent = texts.displayStyle; this.id("displayStyle").textContent = texts.displayStyle;
this.id("displayStyleSurfaces").textContent = texts.styleSurfaces; this.id("displayStyleSurfaces").textContent = texts.styleSurfaces;
@ -120,7 +120,7 @@ var languages = {
this.id("globalValue").textContent = texts.globalValue; this.id("globalValue").textContent = texts.globalValue;
this.id("globalValueRange").textContent = texts.globalValueRange; this.id("globalValueRange").textContent = texts.globalValueRange;
this.id("menuAffichage3dOk").value = texts.ok; this.id("menuAffichage3dOk").value = texts.ok;
this.id("menuAideUsageTab").textContent = texts.usage; this.id("menuAideUsageTab").textContent = texts.usage;
this.id("menuAideExamplesTab").textContent = texts.examples; this.id("menuAideExamplesTab").textContent = texts.examples;
this.id("howItWorks").textContent = texts.howItWorks; this.id("howItWorks").textContent = texts.howItWorks;
@ -180,14 +180,14 @@ var languages = {
this.id("moveRight").textContent = texts.moveRight; this.id("moveRight").textContent = texts.moveRight;
this.id("moveBottom").textContent = texts.moveBottom; this.id("moveBottom").textContent = texts.moveBottom;
this.id("menuAideCloseButton").value = texts.close; this.id("menuAideCloseButton").value = texts.close;
this.id("menuAideExemplesUsageTab").textContent = texts.usage; this.id("menuAideExemplesUsageTab").textContent = texts.usage;
this.id("menuAideExemplesExamplesTab").textContent = texts.examples; this.id("menuAideExemplesExamplesTab").textContent = texts.examples;
this.id("examplesText").textContent = texts.examplesText; this.id("examplesText").textContent = texts.examplesText;
this.id("functions2d").textContent = texts.functions2d; this.id("functions2d").textContent = texts.functions2d;
this.id("functions3d").textContent = texts.functions3d; this.id("functions3d").textContent = texts.functions3d;
this.id("menuAideExemplesCloseButton").value = texts.close; this.id("menuAideExemplesCloseButton").value = texts.close;
this.id("functionStudyTitle").textContent = texts.functionStudy; this.id("functionStudyTitle").textContent = texts.functionStudy;
this.id("domainOfDefinition").textContent = texts.domainOfDefinition; this.id("domainOfDefinition").textContent = texts.domainOfDefinition;
this.id("symmetry").textContent = texts.symmetry; this.id("symmetry").textContent = texts.symmetry;
@ -199,7 +199,7 @@ var languages = {
this.id("functionStudyText").textContent = texts.functionStudyText; this.id("functionStudyText").textContent = texts.functionStudyText;
this.id("menuEtudeBackButton").value = texts.back; this.id("menuEtudeBackButton").value = texts.back;
this.id("menuEtudeCloseButton").value = texts.close; this.id("menuEtudeCloseButton").value = texts.close;
this.id("menuFonctionsFunctionsTab").textContent = texts.functions; this.id("menuFonctionsFunctionsTab").textContent = texts.functions;
this.id("menuFonctionsHistoryTab").textContent = texts.history; this.id("menuFonctionsHistoryTab").textContent = texts.history;
this.id("newFunction").textContent = texts.newFunction; this.id("newFunction").textContent = texts.newFunction;
@ -209,7 +209,7 @@ var languages = {
this.id("functionTypeParametric").textContent = texts.parametric; this.id("functionTypeParametric").textContent = texts.parametric;
this.id("addFunctionButton").value = texts.add; this.id("addFunctionButton").value = texts.add;
this.id("functionsListText").textContent = texts.functionsListText; this.id("functionsListText").textContent = texts.functionsListText;
this.id("editorEditPageEditTab").textContent = texts.edit; this.id("editorEditPageEditTab").textContent = texts.edit;
this.id("editorEditPageToolsTab").textContent = texts.tools; this.id("editorEditPageToolsTab").textContent = texts.tools;
this.id("editorRangeFrom").textContent = texts.from; this.id("editorRangeFrom").textContent = texts.from;
@ -225,7 +225,7 @@ var languages = {
this.id("editorDrawArea").textContent = texts.drawArea; this.id("editorDrawArea").textContent = texts.drawArea;
this.id("editorDuplicate").value = texts.duplicate; this.id("editorDuplicate").value = texts.duplicate;
this.id("editorRemove").value = texts.remove; this.id("editorRemove").value = texts.remove;
this.id("editorToolsPageEditTab").textContent = texts.edit; this.id("editorToolsPageEditTab").textContent = texts.edit;
this.id("editorToolsPageToolsTab").textContent = texts.tools; this.id("editorToolsPageToolsTab").textContent = texts.tools;
this.id("computePoint").textContent = texts.computePoint; this.id("computePoint").textContent = texts.computePoint;
@ -239,14 +239,14 @@ var languages = {
this.id("editorToolsDuplicate").value = texts.duplicate; this.id("editorToolsDuplicate").value = texts.duplicate;
this.id("editorToolsRemove").value = texts.remove; this.id("editorToolsRemove").value = texts.remove;
this.id("menuFonctionsCloseButton").value = texts.close; this.id("menuFonctionsCloseButton").value = texts.close;
this.id("input3dDisplayButton").value = texts.displayAction; this.id("input3dDisplayButton").value = texts.displayAction;
this.id("menuHistoriqueFunctionsTab").textContent = texts.functions; this.id("menuHistoriqueFunctionsTab").textContent = texts.functions;
this.id("menuHistoriqueHistoryTab").textContent = texts.history; this.id("menuHistoriqueHistoryTab").textContent = texts.history;
this.id("latestDisplayedFunctions").textContent = texts.latestDisplayedFunctions; this.id("latestDisplayedFunctions").textContent = texts.latestDisplayedFunctions;
this.id("menuHistoriqueCloseButton").value = texts.close; this.id("menuHistoriqueCloseButton").value = texts.close;
this.id("chooseColor").textContent = texts.chooseColor; this.id("chooseColor").textContent = texts.chooseColor;
this.id("colorPickerColor").textContent = texts.color; this.id("colorPickerColor").textContent = texts.color;
this.id("colorPickerValue").textContent = texts.value; this.id("colorPickerValue").textContent = texts.value;
@ -259,7 +259,7 @@ var languages = {
this.id("apercuCouleur2").title = texts.oldColor; this.id("apercuCouleur2").title = texts.oldColor;
this.id("colorPickerCancelButton").value = texts.cancel; this.id("colorPickerCancelButton").value = texts.cancel;
this.id("colorPickerOkButton").value = texts.ok; this.id("colorPickerOkButton").value = texts.ok;
this.id("blackListError").textContent = texts.error; this.id("blackListError").textContent = texts.error;
this.id("cannotDrawFunction").textContent = texts.cannotDrawFunction; this.id("cannotDrawFunction").textContent = texts.cannotDrawFunction;
this.id("invalidExpression").textContent = texts.invalidExpression; this.id("invalidExpression").textContent = texts.invalidExpression;
@ -270,7 +270,7 @@ var languages = {
this.id("youCanFindExamples").textContent = texts.youCanFindExamples; this.id("youCanFindExamples").textContent = texts.youCanFindExamples;
this.id("fctErrorHelpButton").value = texts.help; this.id("fctErrorHelpButton").value = texts.help;
this.id("fctErrorOkButton").value = texts.ok; this.id("fctErrorOkButton").value = texts.ok;
this.id("menuSaveGraphTitle").textContent = texts.saveGraph; this.id("menuSaveGraphTitle").textContent = texts.saveGraph;
this.id("saveWidthText").textContent = texts.width; this.id("saveWidthText").textContent = texts.width;
this.id("saveHeightText").textContent = texts.height; this.id("saveHeightText").textContent = texts.height;
@ -278,11 +278,11 @@ var languages = {
this.id("imageFormat").textContent = texts.imageFormat; this.id("imageFormat").textContent = texts.imageFormat;
this.id("menuSaveGraphCancelButton").value = texts.cancel; this.id("menuSaveGraphCancelButton").value = texts.cancel;
this.id("menuSaveGraphOkButton").value = texts.ok; this.id("menuSaveGraphOkButton").value = texts.ok;
this.id("saveImageTitle").textContent = texts.saveImageTitle; this.id("saveImageTitle").textContent = texts.saveImageTitle;
this.id("saveImageText").textContent = texts.saveImageText; this.id("saveImageText").textContent = texts.saveImageText;
this.id("menuSaveImageCloseButton").value = texts.close; this.id("menuSaveImageCloseButton").value = texts.close;
this.id("updateTitle").textContent = texts.update; this.id("updateTitle").textContent = texts.update;
this.id("currentVersion").textContent = texts.currentVersion; this.id("currentVersion").textContent = texts.currentVersion;
this.id("latestVersionAvailable").textContent = texts.latestVersionAvailable; this.id("latestVersionAvailable").textContent = texts.latestVersionAvailable;
@ -290,11 +290,11 @@ var languages = {
// this.id("useLatestVersion").value = texts.useLatestVersion; // this.id("useLatestVersion").value = texts.useLatestVersion;
this.id("updateBackButton").value = texts.back; this.id("updateBackButton").value = texts.back;
this.id("updateOkButton").value = texts.ok; this.id("updateOkButton").value = texts.ok;
this.id("updateErrorTitle").textContent = texts.error; this.id("updateErrorTitle").textContent = texts.error;
this.id("updateErrorText").textContent = texts.updateErrorText; this.id("updateErrorText").textContent = texts.updateErrorText;
this.id("updateErrorOkButton").value = texts.ok; this.id("updateErrorOkButton").value = texts.ok;
this.id("ctxMenuDisplay").textContent = texts.display; this.id("ctxMenuDisplay").textContent = texts.display;
this.id("ctxMenuAxes").textContent = texts.axes; this.id("ctxMenuAxes").textContent = texts.axes;
this.id("ctxMenuScale").textContent = texts.scale; this.id("ctxMenuScale").textContent = texts.scale;
@ -302,11 +302,11 @@ var languages = {
this.id("ctxMenuReset").value = texts.reset; this.id("ctxMenuReset").value = texts.reset;
this.id("ctxMenuSave").value = texts.save; this.id("ctxMenuSave").value = texts.save;
}, },
class: function(className){ class: function(className){
return document.getElementsByClassName(className); return document.getElementsByClassName(className);
}, },
id: function(id){ id: function(id){
return document.getElementById(id); return document.getElementById(id);
} }
@ -503,7 +503,7 @@ var langTexts = {
"reset": "Réinitialiser", "reset": "Réinitialiser",
"saveImageTitle": "Sauvegarder l'image", "saveImageTitle": "Sauvegarder l'image",
"saveImageText": "Cliquez avec le bouton de droite sur l'image et sélectionnez \"Enregistrer l'image\". Il est aussi possible de choisir \"Copier l'image\" et ensuite la coller dans une autre application.", "saveImageText": "Cliquez avec le bouton de droite sur l'image et sélectionnez \"Enregistrer l'image\". Il est aussi possible de choisir \"Copier l'image\" et ensuite la coller dans une autre application.",
/* Inside code */ /* Inside code */
"even": "paire", "even": "paire",
"odd": "impaire", "odd": "impaire",

Loading…
Cancel
Save