Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 975 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 975 Rev 989
Line 89... Line 89...
89
		
89
		
Line 90... Line 90...
90
	/// ++++ svg +++++ ///
90
	/// ++++ svg +++++ ///
91
	
91
	
92
	public function changerValeursSVG(){
92
	public function changerValeursSVG(){
-
 
93
		$Dompath = new DOMXPath($this->dom);
93
		$Dompath = new DOMXPath($this->dom);
94
		foreach ($this->valeurs_en_pourcentage as $cle => $val) {
94
		foreach ($this->valeurs_en_pourcentage as $cle => $val){
95
			if ($val !== null) { // sinon valeur inconnue donc pas de point rouge
95
				$val = preg_replace('/,/','.', $val);
96
				$val = preg_replace('/,/','.', $val);
96
				$grad_id = array_search($val,$this->graduations_id);
97
				$grad_id = array_search($val,$this->graduations_id);
97
				$element = $Dompath->query("//*[@id='".$grad_id."']")->item(0);
98
				$element = $Dompath->query("//*[@id='".$grad_id."']")->item(0);
Line 101... Line 102...
101
					$curseur->setAttribute('cx', $pos_x);
102
					$curseur->setAttribute('cx', $pos_x);
102
					$curseur->setAttribute('class', 'curseur');
103
					$curseur->setAttribute('class', 'curseur');
103
					$this->ajouterInfoAuSurvol($curseur);
104
					$this->ajouterInfoAuSurvol($curseur);
104
					$changement = true;
105
					$changement = true;
105
				}
106
				}
-
 
107
			}
106
		}
108
		}
107
		$this->ajusterFormatSVG();
109
		$this->ajusterFormatSVG();
Line 108... Line 110...
108
		
110
		
Line 109... Line 111...
109
	}
111
	}
110
	
112
	
111
	
113
	
-
 
114
	public function ajouterInfoAuSurvol($curseur){
112
	public function ajouterInfoAuSurvol($curseur){
115
		$champs = $curseur->getAttribute('id');
113
		$champs = $curseur->getAttribute('id');
116
		$valeurTexte = $this->recupererOntologies($this->valeurs_champs[$champs], $champs );
-
 
117
		if ($valeurTexte !== false) {
114
		$valeurTexte = $this->recupererOntologies($this->valeurs_champs[$champs], $champs );
118
			$valeurTexte = $this->traiterIntermediaires($valeurTexte->nom, $champs, $champs);
Line 115... Line 119...
115
		$valeurTexte = $this->traiterIntermediaires($valeurTexte->nom, $champs, $champs);
119
			$curseur->setAttribute('title',$this->valeurs_champs[$champs].": ".$valeurTexte );
116
		$curseur->setAttribute('title',$this->valeurs_champs[$champs].": ".$valeurTexte );
120
		}
117
	}
121
	}