From 6e9a81f34e2755dc003ea918f2f087ba19fcd87d Mon Sep 17 00:00:00 2001 From: Mattia Meneguzzo Date: Sun, 13 May 2012 17:12:49 +0300 Subject: [PATCH] Changed the display of wind data. --- src/extension.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/extension.js b/src/extension.js index a491a0e..c25805b 100644 --- a/src/extension.js +++ b/src/extension.js @@ -816,7 +816,12 @@ WeatherMenuButton.prototype = { wind_unit = 'knots'; break; } - this._currentWeatherWind.text = (wind_direction && wind > 0 ? wind_direction + ' ' : '') + wind + ' ' + wind_unit; + if (!wind) + this._currentWeatherWind.text = '\u2013'; + else if (wind == 0 || !wind_direction) + this._currentWeatherWind.text = wind + ' ' + wind_unit; + else // i.e. wind > 0 && wind_direction + this._currentWeatherWind.text = wind_direction + ' ' + wind + ' ' + wind_unit; // Refresh forecast let date_string = [_('Today'), _('Tomorrow')];