forked from MapComplete/MapComplete
		
	Chore: housekeeping
This commit is contained in:
		
							parent
							
								
									89027ed516
								
							
						
					
					
						commit
						7d51c94e1f
					
				
					 21 changed files with 622 additions and 427 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import BaseUIElement from "../BaseUIElement"
 | 
			
		||||
import {InputElement} from "./InputElement"
 | 
			
		||||
import {UIEventSource} from "../../Logic/UIEventSource"
 | 
			
		||||
import { InputElement } from "./InputElement"
 | 
			
		||||
import { UIEventSource } from "../../Logic/UIEventSource"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @deprecated
 | 
			
		||||
| 
						 | 
				
			
			@ -67,20 +67,18 @@ export default class FileSelectorButton extends InputElement<FileList> {
 | 
			
		|||
            if (actualInputElement.files !== null) {
 | 
			
		||||
                self._value.setData(actualInputElement.files)
 | 
			
		||||
            }
 | 
			
		||||
            actualInputElement.classList.remove("glowing-shadow");
 | 
			
		||||
            actualInputElement.classList.remove("glowing-shadow")
 | 
			
		||||
 | 
			
		||||
            e.preventDefault()
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        el.appendChild(actualInputElement)
 | 
			
		||||
 | 
			
		||||
        function setDrawAttention(isOn: boolean){
 | 
			
		||||
            if(isOn){
 | 
			
		||||
        function setDrawAttention(isOn: boolean) {
 | 
			
		||||
            if (isOn) {
 | 
			
		||||
                label.classList.add("glowing-shadow")
 | 
			
		||||
 | 
			
		||||
            }else{
 | 
			
		||||
            } else {
 | 
			
		||||
                label.classList.remove("glowing-shadow")
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -90,10 +88,9 @@ export default class FileSelectorButton extends InputElement<FileList> {
 | 
			
		|||
            setDrawAttention(true)
 | 
			
		||||
            // Style the drag-and-drop as a "copy file" operation.
 | 
			
		||||
            event.dataTransfer.dropEffect = "copy"
 | 
			
		||||
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        window.document.addEventListener("dragenter", () =>{
 | 
			
		||||
        window.document.addEventListener("dragenter", () => {
 | 
			
		||||
            setDrawAttention(true)
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -101,7 +98,6 @@ export default class FileSelectorButton extends InputElement<FileList> {
 | 
			
		|||
            setDrawAttention(false)
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        el.addEventListener("drop", (event) => {
 | 
			
		||||
            event.stopPropagation()
 | 
			
		||||
            event.preventDefault()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue