| 
									
										
										
										
											2021-06-18 01:25:13 +02:00
										 |  |  | import Combine from "../Base/Combine"; | 
					
						
							|  |  |  | import Attribution from "./Attribution"; | 
					
						
							|  |  |  | import Img from "../Base/Img"; | 
					
						
							| 
									
										
										
										
											2021-09-29 23:56:59 +02:00
										 |  |  | import {ProvidedImage} from "../../Logic/ImageProviders/ImageProvider"; | 
					
						
							| 
									
										
										
										
											2021-09-15 01:33:52 +02:00
										 |  |  | import BaseUIElement from "../BaseUIElement"; | 
					
						
							| 
									
										
										
										
											2021-10-01 02:57:41 +02:00
										 |  |  | import {Mapillary} from "../../Logic/ImageProviders/Mapillary"; | 
					
						
							| 
									
										
										
										
											2021-06-18 01:25:13 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export class AttributedImage extends Combine { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-29 23:56:59 +02:00
										 |  |  |     constructor(imageInfo: ProvidedImage) { | 
					
						
							| 
									
										
										
										
											2021-09-15 01:33:52 +02:00
										 |  |  |         let img: BaseUIElement; | 
					
						
							|  |  |  |         let attr: BaseUIElement | 
					
						
							| 
									
										
										
										
											2021-10-01 02:57:41 +02:00
										 |  |  |         img = new Img(imageInfo.url, false, { | 
					
						
							|  |  |  |             fallbackImage:  imageInfo.provider === Mapillary.singleton ? "./assets/svg/blocked.svg" : undefined | 
					
						
							|  |  |  |         }); | 
					
						
							| 
									
										
										
										
											2021-09-29 23:56:59 +02:00
										 |  |  |         attr = new Attribution(imageInfo.provider.GetAttributionFor(imageInfo.url), | 
					
						
							|  |  |  |                 imageInfo.provider.SourceIcon(), | 
					
						
							|  |  |  |         ) | 
					
						
							| 
									
										
										
										
											2021-09-15 01:33:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         super([img, attr]); | 
					
						
							| 
									
										
										
										
											2021-06-18 01:25:13 +02:00
										 |  |  |         this.SetClass('block relative h-full'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |