forked from MapComplete/MapComplete
Refactoring: move download functionality for OsmObjects into a new object
This commit is contained in:
parent
8eb2c68f79
commit
1f9aacfb29
23 changed files with 633 additions and 901 deletions
|
@ -233,13 +233,13 @@ export default class MoveWizard extends Toggle {
|
|||
} else if (id.startsWith("relation")) {
|
||||
moveDisallowedReason.setData(t.isRelation)
|
||||
} else if (id.indexOf("-") < 0) {
|
||||
OsmObject.DownloadReferencingWays(id).then((referencing) => {
|
||||
state.osmObjectDownloader.DownloadReferencingWays(id).then((referencing) => {
|
||||
if (referencing.length > 0) {
|
||||
console.log("Got a referencing way, move not allowed")
|
||||
moveDisallowedReason.setData(t.partOfAWay)
|
||||
}
|
||||
})
|
||||
OsmObject.DownloadReferencingRelations(id).then((partOf) => {
|
||||
state.osmObjectDownloader.DownloadReferencingRelations(id).then((partOf) => {
|
||||
if (partOf.length > 0) {
|
||||
moveDisallowedReason.setData(t.partOfRelation)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue