| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | import BaseUIElement from "../BaseUIElement"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export class CenterFlexedElement extends BaseUIElement { | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |     private _html: string; | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |     constructor(html: string) { | 
					
						
							|  |  |  |         super(); | 
					
						
							|  |  |  |         this._html = html ?? ""; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |     InnerRender(): string { | 
					
						
							|  |  |  |         return this._html; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |     AsMarkdown(): string { | 
					
						
							|  |  |  |         return this._html; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |     protected InnerConstructElement(): HTMLElement { | 
					
						
							|  |  |  |         const e = document.createElement("div"); | 
					
						
							|  |  |  |         e.innerHTML = this._html; | 
					
						
							|  |  |  |         e.style.display = "flex"; | 
					
						
							|  |  |  |         e.style.height = "100%"; | 
					
						
							|  |  |  |         e.style.width = "100%"; | 
					
						
							|  |  |  |         e.style.flexDirection = "column"; | 
					
						
							|  |  |  |         e.style.flexWrap = "nowrap"; | 
					
						
							|  |  |  |         e.style.alignContent = "center"; | 
					
						
							|  |  |  |         e.style.justifyContent = "center"; | 
					
						
							|  |  |  |         e.style.alignItems = "center"; | 
					
						
							|  |  |  |         return e; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-07-19 16:23:13 +02:00
										 |  |  | } |