summaryrefslogtreecommitdiffstats
path: root/qml/js
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2014-05-10 12:23:45 +0200
committerCaroline Chao <caroline.chao@digia.com>2014-05-12 09:31:50 +0200
commit1abd2c072b91482ffddeaccb421bc997c26d3c77 (patch)
treef674fa4a6390f0855db121ee513a848325efc3dc /qml/js
parent11cb0682d0f1dc8434b5711dea6ec174f69095dc (diff)
Review the temperature label preferredWidth calculation in zoom item
It is now more generic and can adapt to different localizations and temperature units if needed. Change-Id: I8b756cd117e5be8bfbf3cc538c62542a5c9e371c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'qml/js')
-rw-r--r--qml/js/utils.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/qml/js/utils.js b/qml/js/utils.js
index 76dffe3..cf5948f 100644
--- a/qml/js/utils.js
+++ b/qml/js/utils.js
@@ -125,20 +125,6 @@ function getMaxMinTemp(dayModel) {
return [minTemp, maxTemp]
}
-function getMaxTempLenght(cityModel) {
- var maxLength = 1
- for (var indexDay = 0; indexDay < cityModel.daysCount(); indexDay++) {
- var day = cityModel.getDayModel(indexDay)
- var range = getMaxMinTemp(day)
- maxLength = Math.max(range[0].toString().length, maxLength)
- maxLength = Math.max(range[1].toString().length, maxLength)
- }
- var stringTemp = "555" // temperatures estimated between -55 and +55
- if (maxLength === 3)
- stringTemp = "-" + stringTemp
- return stringTemp.substring(0, maxLength)
-}
-
// WeatherModel utils
function getWindType(windspeed)