JQuery est remis en place...
[svganimation.git] / SVGPlayerOne.js
1 // -----------------------------------------------------------------------------
2 // Boutons (version A)
3 function SVGPlayerOne(a) {
4 Controle.call(this,a);
5 SVGPlayerOne.prototype.connect = Controle.prototype.connect
6 }
7 // Surcharge de la méthode [Initialisation]
8 SVGPlayerOne.prototype.Initialisation = function() {
9 var a = this.a;
10 var self = this.me;
11 a.image.style.display = 'inline';
12 a.message.parentNode.removeChild(a.message);
13 var play = document.createElement('button');
14 play.className = "SVGplay playBtn"; // ajout de classe
15 play.innerHTML = "Play"; // texte
16 a.boutons.appendChild(play);
17 play.onclick = function(){a.action = true; a.rotate(self.a)};
18 var stop = document.createElement('button');
19 stop.className = "SVGplay stopBtn";
20 stop.innerHTML = "Stop";
21 stop.onclick = function(){a.action = false;};
22 var debut = document.createElement('button');
23 debut.className = "SVGplay debutBtn";
24 debut.innerHTML = "Début";
25 debut.onclick = function(){a.action = false; a.first(self.a)};
26 var fin = document.createElement('button');
27 fin.className = "SVGplay finBtn";
28 fin.innerHTML = "Fin";
29 fin.onclick = function(){a.action = false; a.last(self.a)};
30 var moins = document.createElement('button');
31 moins.className = "SVGplay moinsBtn";
32 moins.innerHTML = "-";
33 moins.onclick = function(){a.delai = a.delai > 2000 ? 2000 : a.delai * 1.414};
34 var plus = document.createElement('button');
35 plus.className = "SVGplay plusBtn";
36 plus.innerHTML = "+";
37 plus.onclick = function(){a.delai = a.delai < 30 ? 30 : a.delai / 1.414};
38 // placement des boutons
39 a.boutons.appendChild(stop);
40 a.boutons.appendChild(debut);
41 a.boutons.appendChild(fin);
42 a.boutons.appendChild(moins);
43 a.boutons.appendChild(plus);
44 }

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.