forked from MapComplete/MapComplete
		
	New roaming rendering system which allows layers to push questions, badges and title-icons to all the other layers, improve bike-clean-services
This commit is contained in:
		
							parent
							
								
									77ffdc093a
								
							
						
					
					
						commit
						2a31badd3d
					
				
					 16 changed files with 427 additions and 394 deletions
				
			
		|  | @ -75,7 +75,7 @@ export default class LayoutConfig { | |||
|                         return SharedTagRenderings.SharedTagRendering[tr]; | ||||
|                     } | ||||
|                 } | ||||
|                 return new TagRenderingConfig(tr, `${this.id}.roaming_renderings[${i}]`); | ||||
|                 return new TagRenderingConfig(tr, undefined,`${this.id}.roaming_renderings[${i}]`); | ||||
|             } | ||||
|         ); | ||||
|         this.defaultBackgroundId = json.defaultBackgroundId; | ||||
|  | @ -102,9 +102,23 @@ export default class LayoutConfig { | |||
|             } | ||||
| 
 | ||||
|             // @ts-ignore
 | ||||
|             return new LayerConfig(layer, this.roamingRenderings, `${this.id}.layers[${i}]`); | ||||
|             return new LayerConfig(layer, `${this.id}.layers[${i}]`) | ||||
|         }); | ||||
|          | ||||
|         // ALl the layers are constructed, let them share tags in piece now!
 | ||||
|         const roaming : {r, source: LayerConfig}[] = [] | ||||
|         for (const layer of this.layers) { | ||||
|             roaming.push({r: layer.GetRoamingRenderings(), source:layer}); | ||||
|         } | ||||
| 
 | ||||
|         for (const layer of this.layers) { | ||||
|             for (const r of roaming) { | ||||
|                 if(r.source == layer){ | ||||
|                     continue; | ||||
|                 } | ||||
|                 layer.AddRoamingRenderings(r.r); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         this.clustering = { | ||||
|             maxZoom: 16, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue