CVS: phpweather/output pw_images.php,1.6,1.7
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2003-01-21 22:27:31
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv19449/output Modified Files: pw_images.php Log Message: Rudy Boedts wanted the direction of the arrows changed, so this is now configurable through the reverse_dir option. Index: pw_images.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- pw_images.php 29 Jun 2002 11:13:41 -0000 1.6 +++ pw_images.php 21 Jan 2003 22:27:28 -0000 1.7 @@ -384,8 +384,13 @@ } elseif (($wind['deg'] == 0) && ($wind['knots'] == 0)) { return $this->properties['icons_path'] . $this->wind_nodir_image; } else { - return $this->properties['icons_path'] . - $this->wind_dir_images[round($wind['deg']/22.5)]; + if ($this->properties['reverse_dir']) { + return $this->properties['icons_path'] . + $this->wind_dir_images[round($wind['deg']/22.5 + 8) % 16]; + } else { + return $this->properties['icons_path'] . + $this->wind_dir_images[round($wind['deg']/22.5)]; + } } } else { return $this->properties['icons_path'] . $this->wind_nodata_image; |