forked from MapComplete/MapComplete
Fix: actually don't show grey loading placeholder for wikidata/wikipedia, add tests
This commit is contained in:
parent
640fe62440
commit
87ab165e58
1 changed files with 2 additions and 2 deletions
|
|
@ -73,6 +73,8 @@ export default class AllImageProviders {
|
||||||
* Will simply count all image tags
|
* Will simply count all image tags
|
||||||
*
|
*
|
||||||
* AllImageProviders.estimateNumberOfImages({image:"abc", "mapillary": "123", "panoramax:0": "xyz"}) // => 3
|
* AllImageProviders.estimateNumberOfImages({image:"abc", "mapillary": "123", "panoramax:0": "xyz"}) // => 3
|
||||||
|
* AllImageProviders.estimateNumberOfImages({wikidata:"Q123", "wikipedia": "nl:xyz"}) // => 0
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static estimateNumberOfImages(tags: Record<string, string>, prefixes: string[] = undefined): number {
|
public static estimateNumberOfImages(tags: Record<string, string>, prefixes: string[] = undefined): number {
|
||||||
|
|
@ -80,8 +82,6 @@ export default class AllImageProviders {
|
||||||
|
|
||||||
const sources = [Imgur.singleton,
|
const sources = [Imgur.singleton,
|
||||||
Mapillary.singleton,
|
Mapillary.singleton,
|
||||||
WikidataImageProvider.singleton,
|
|
||||||
WikimediaImageProvider.singleton,
|
|
||||||
Panoramax.singleton,
|
Panoramax.singleton,
|
||||||
AllImageProviders.genericImageProvider]
|
AllImageProviders.genericImageProvider]
|
||||||
const allPrefixes = Utils.Dedup(prefixes ?? [].concat(...sources.map(s => s.defaultKeyPrefixes)))
|
const allPrefixes = Utils.Dedup(prefixes ?? [].concat(...sources.map(s => s.defaultKeyPrefixes)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue