forked from MapComplete/MapComplete
Merge branch 'develop' into feature/lod-vis
This commit is contained in:
commit
6771a62ef5
5 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mapcomplete",
|
"name": "mapcomplete",
|
||||||
"version": "0.41.4",
|
"version": "0.41.5",
|
||||||
"repository": "https://github.com/pietervdvn/MapComplete",
|
"repository": "https://github.com/pietervdvn/MapComplete",
|
||||||
"description": "A small website to edit OSM easily",
|
"description": "A small website to edit OSM easily",
|
||||||
"bugs": "https://github.com/pietervdvn/MapComplete/issues",
|
"bugs": "https://github.com/pietervdvn/MapComplete/issues",
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default class GeoLocationHandler {
|
||||||
|
|
||||||
if (!this.geolocationState.allowMoving.data) {
|
if (!this.geolocationState.allowMoving.data) {
|
||||||
// Jup, the map is locked to the bound location: move automatically
|
// Jup, the map is locked to the bound location: move automatically
|
||||||
self.MoveMapToCurrentLocation()
|
self.MoveMapToCurrentLocation(0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -113,7 +113,7 @@ export default class GeoLocationHandler {
|
||||||
* - The GPS-location iss NULL-island
|
* - The GPS-location iss NULL-island
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
public MoveMapToCurrentLocation() {
|
public MoveMapToCurrentLocation(zoomToAtLeast: number = 14 ) {
|
||||||
const newLocation = this.geolocationState.currentGPSLocation.data
|
const newLocation = this.geolocationState.currentGPSLocation.data
|
||||||
const mapLocation = this.mapProperties.location
|
const mapLocation = this.mapProperties.location
|
||||||
// We got a new location.
|
// We got a new location.
|
||||||
|
@ -143,7 +143,7 @@ export default class GeoLocationHandler {
|
||||||
lat: newLocation.latitude,
|
lat: newLocation.latitude,
|
||||||
})
|
})
|
||||||
const zoom = this.mapProperties.zoom
|
const zoom = this.mapProperties.zoom
|
||||||
zoom.setData(Math.min(Math.max(zoom.data, 14), 18))
|
zoom.setData(Math.min(Math.max(zoom.data, zoomToAtLeast), 18))
|
||||||
|
|
||||||
this.mapHasMoved.setData(new Date())
|
this.mapHasMoved.setData(new Date())
|
||||||
this.geolocationState.requestMoment.setData(undefined)
|
this.geolocationState.requestMoment.setData(undefined)
|
||||||
|
|
|
@ -546,7 +546,7 @@ export class OsmConnection {
|
||||||
redirect_uri: Utils.runningFromConsole
|
redirect_uri: Utils.runningFromConsole
|
||||||
? "https://mapcomplete.org/land.html"
|
? "https://mapcomplete.org/land.html"
|
||||||
: window.location.protocol + "//" + window.location.host + "/land.html",
|
: window.location.protocol + "//" + window.location.host + "/land.html",
|
||||||
singlepage: !standalone,
|
singlepage: true,
|
||||||
auto: true
|
auto: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class GeoLocationState {
|
||||||
*/
|
*/
|
||||||
public readonly requestMoment: UIEventSource<Date | undefined> = new UIEventSource(undefined)
|
public readonly requestMoment: UIEventSource<Date | undefined> = new UIEventSource(undefined)
|
||||||
/**
|
/**
|
||||||
* If true: the map will center (and re-center) to this location
|
* If true: the map will center (and re-center) to the current GPS-location
|
||||||
*/
|
*/
|
||||||
public readonly allowMoving: UIEventSource<boolean> = new UIEventSource<boolean>(true)
|
public readonly allowMoving: UIEventSource<boolean> = new UIEventSource<boolean>(true)
|
||||||
|
|
||||||
|
|
|
@ -71,13 +71,13 @@
|
||||||
let firstQuestion: UIEventSource<TagRenderingConfig> = new UIEventSource<TagRenderingConfig>(undefined)
|
let firstQuestion: UIEventSource<TagRenderingConfig> = new UIEventSource<TagRenderingConfig>(undefined)
|
||||||
let allQuestionsToAsk : UIEventSource<TagRenderingConfig[]> = new UIEventSource<TagRenderingConfig[]>([])
|
let allQuestionsToAsk : UIEventSource<TagRenderingConfig[]> = new UIEventSource<TagRenderingConfig[]>([])
|
||||||
|
|
||||||
function calculateQuestions(){
|
async function calculateQuestions(){
|
||||||
console.log("Applying questions to ask")
|
console.log("Applying questions to ask")
|
||||||
const qta = questionsToAsk.data
|
const qta = questionsToAsk.data
|
||||||
firstQuestion.setData(undefined)
|
firstQuestion.setData(undefined)
|
||||||
firstQuestion.setData(qta[0])
|
|
||||||
|
|
||||||
allQuestionsToAsk.setData([])
|
allQuestionsToAsk.setData([])
|
||||||
|
await Utils.awaitAnimationFrame()
|
||||||
|
firstQuestion.setData(qta[0])
|
||||||
allQuestionsToAsk.setData(qta)
|
allQuestionsToAsk.setData(qta)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue