[gnome-maps] utils: Use circle radius to represent the accuracy
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] utils: Use circle radius to represent the accuracy
- Date: Fri, 10 Oct 2014 17:59:46 +0000 (UTC)
commit da1306ba1faff7a23e1bdce9dcf727a0e7dfeb7c
Author: Damián Nohales <damiannohales gmail com>
Date: Wed Oct 1 12:50:39 2014 -0300
utils: Use circle radius to represent the accuracy
https://bugzilla.gnome.org/show_bug.cgi?id=736768
src/utils.js | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index 4538af1..5a8979d 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -167,15 +167,7 @@ function getAccuracyDescription(accuracy) {
/* Translators: Accuracy of user location information */
return _("Exact");
default:
- let area = Math.PI * Math.pow(accuracy / 1000, 2);
-
- debug(accuracy + ' => ' + area);
- if (area >= 1)
- area = Math.floor(area);
- else
- area = Math.floor(area * 10) / 10;
-
- return _("%f km²").format(area);
+ return prettyDistance(accuracy);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]