Revert "Diameter preference is unused."

This reverts commit 55cc20ec96.
This commit is contained in:
Juho Teperi
2013-05-08 12:32:37 +03:00
parent 9c414d8389
commit fab4189347
3 changed files with 15 additions and 0 deletions

View File

@@ -10,11 +10,21 @@ window.settings = {
'staticmaps_key': 'AIzaSyDtGhiAnSdg9TaGZC_daNcQe43BS8Ws7Iw'
};
window.c = function () {
return Math.PI * localStorage.diameter * 2.54 / 100;
};
if (_.has(localStorage, 'diameter') && !_.isNumber(localStorage.diameter)) {
delete localStorage.diameter;
}
if (_.has(localStorage, 'multiplier') && !_.isNumber(localStorage.multiplier)) {
delete localStorage.multiplier;
}
_.defaults(localStorage, {
diameter: 28,
multiplier: 2.5
});