forked from MapComplete/MapComplete
		
	Refactoring of Attribute Images, fix more or less decent slideshow. Turns out a few lines of css can get us there!
This commit is contained in:
		
							parent
							
								
									6ba4cb18c6
								
							
						
					
					
						commit
						1609c63f3b
					
				
					 20 changed files with 363 additions and 361 deletions
				
			
		
							
								
								
									
										19
									
								
								UI/Image/AttributedImage.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								UI/Image/AttributedImage.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| import Combine from "../Base/Combine"; | ||||
| import Attribution from "./Attribution"; | ||||
| import Img from "../Base/Img"; | ||||
| import ImageAttributionSource from "../../Logic/Web/ImageAttributionSource"; | ||||
| 
 | ||||
| 
 | ||||
| export class AttributedImage extends Combine { | ||||
| 
 | ||||
|     constructor(urlSource: string, imgSource: ImageAttributionSource) { | ||||
|         urlSource = imgSource.PrepareUrl(urlSource) | ||||
|         super([ | ||||
|             new Img( urlSource), | ||||
|             new Attribution(imgSource.GetAttributionFor(urlSource), imgSource.SourceIcon()) | ||||
|         ]); | ||||
|         this.SetClass('block relative h-full'); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue