forked from MapComplete/MapComplete
		
	Fix sharebutton
This commit is contained in:
		
							parent
							
								
									afbe765ce9
								
							
						
					
					
						commit
						42d13f564c
					
				
					 7 changed files with 51 additions and 59 deletions
				
			
		|  | @ -16,36 +16,6 @@ export class SlideShow extends BaseUIElement { | |||
|         const el = document.createElement("div") | ||||
|         el.classList.add("slic-carousel") | ||||
| 
 | ||||
|         el.onchange = () => { | ||||
|             console.log("Parent is now ", el.parentElement) | ||||
|         } | ||||
| 
 | ||||
|         const mutationObserver = new MutationObserver(mutations => { | ||||
|             console.log("Mutations are: ", mutations) | ||||
|              | ||||
|              | ||||
|             mutationObserver.disconnect() | ||||
|             require("slick-carousel") | ||||
|             // @ts-ignore
 | ||||
|             el.slick({ | ||||
|                 autoplay: true, | ||||
|                 arrows: true, | ||||
|                 dots: true, | ||||
|                 lazyLoad: 'progressive', | ||||
|                 variableWidth: true, | ||||
|                 centerMode: true, | ||||
|                 centerPadding: "60px", | ||||
|                 adaptive: true | ||||
|             }); | ||||
|         }) | ||||
| 
 | ||||
|         mutationObserver.observe(el, { | ||||
|             childList: true, | ||||
|             characterData: true, | ||||
|             subtree: true | ||||
|         }) | ||||
| 
 | ||||
| 
 | ||||
|         this.embeddedElements.addCallbackAndRun(elements => { | ||||
|             for (const element of elements ?? []) { | ||||
|                 element.SetClass("slick-carousel-content") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue