forked from MapComplete/MapComplete
		
	Cleanup of the image carousel code and index.css code
This commit is contained in:
		
							parent
							
								
									21c71febca
								
							
						
					
					
						commit
						c7f33a9490
					
				
					 14 changed files with 190 additions and 318 deletions
				
			
		
							
								
								
									
										33
									
								
								test.ts
									
										
									
									
									
								
							
							
						
						
									
										33
									
								
								test.ts
									
										
									
									
									
								
							|  | @ -1,25 +1,14 @@ | |||
| import {CheckBoxes} from "./UI/Input/Checkboxes"; | ||||
| import {FixedInputElement} from "./UI/Input/FixedInputElement"; | ||||
| import {VariableUiElement} from "./UI/Base/VariableUIElement"; | ||||
| import {ImageCarousel} from "./UI/Image/ImageCarousel"; | ||||
| import {UIEventSource} from "./Logic/UIEventSource"; | ||||
| import {OsmConnection} from "./Logic/Osm/OsmConnection"; | ||||
| 
 | ||||
| const connection = new OsmConnection(true, new UIEventSource<string>(undefined), "qsdf"); | ||||
| connection.AttemptLogin(); | ||||
| 
 | ||||
| 
 | ||||
| const cb = new CheckBoxes( | ||||
|    [ new FixedInputElement("One", 1), | ||||
|    new FixedInputElement("Two",2), | ||||
|    new FixedInputElement("Thee",3)] | ||||
| ) | ||||
| const imageCarousel = new ImageCarousel(new UIEventSource<any>({ | ||||
|     "image": "https://i.imgur.com/kX3rl3v.jpg" | ||||
| }), connection); | ||||
| 
 | ||||
| cb.AttachTo("maindiv"); | ||||
| new VariableUiElement(cb.GetValue().map(ts => ts?.join(", "))).AttachTo("extradiv") | ||||
| 
 | ||||
| window.setTimeout(() => { | ||||
|    cb.GetValue().setData([2,3]); | ||||
| }, 2500) | ||||
| 
 | ||||
| window.setTimeout(() => { | ||||
|    cb.GetValue().setData([2]); | ||||
| }, 3000) | ||||
| 
 | ||||
| window.setTimeout(() => { | ||||
|    cb.GetValue().setData([1, 2]); | ||||
| }, 3500) | ||||
| imageCarousel.AttachTo("maindiv") | ||||
| imageCarousel.Activate(); | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue