1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Revert "Applied prettier to code base"

This reverts commit c4f19465a6.
This commit is contained in:
Laurent Cozic
2018-03-09 20:59:12 +00:00
parent 5e8b09f5af
commit 55c5ddedf4
203 changed files with 7883 additions and 13355 deletions

View File

@ -1,40 +1,38 @@
const Setting = require("lib/models/Setting.js");
const Setting = require('lib/models/Setting.js');
class GeolocationReact {
static currentPosition_testResponse() {
return {
mocked: false,
timestamp: new Date().getTime(),
timestamp: (new Date()).getTime(),
coords: {
speed: 0,
heading: 0,
accuracy: 20,
longitude: -3.4596633911132812,
altitude: 0,
latitude: 48.73219093634444,
},
};
latitude: 48.73219093634444
}
}
}
static currentPosition(options = null) {
if (Setting.value("env") == "dev") return this.currentPosition_testResponse();
if (Setting.value('env') == 'dev') return this.currentPosition_testResponse();
if (!options) options = {};
if (!("enableHighAccuracy" in options)) options.enableHighAccuracy = true;
if (!("timeout" in options)) options.timeout = 10000;
if (!('enableHighAccuracy' in options)) options.enableHighAccuracy = true;
if (!('timeout' in options)) options.timeout = 10000;
return new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(
data => {
resolve(data);
},
error => {
reject(error);
},
options
);
navigator.geolocation.getCurrentPosition((data) => {
resolve(data);
}, (error) => {
reject(error);
}, options);
});
}
}
module.exports = { GeolocationReact };
module.exports = { GeolocationReact };