undone wrong update

This commit is contained in:
dcore94 2023-02-09 13:22:38 +01:00
parent 2665ac4d58
commit 688b240d72
1 changed files with 7 additions and 15 deletions

View File

@ -535,21 +535,13 @@ class CCPMethodEditorController extends HTMLElement{
})
this.#rootdoc.addEventListener("drop", ev=>{
if(ev.dataTransfer && ev.dataTransfer.files.length === 0){
if(ev.dataTransfer.getData('text/plain+ccpmethod')){
const method = JSON.parse(ev.dataTransfer.getData('application/json+ccpmethod'))
ev.stopImmediatePropagation()
ev.preventDefault()
ev.stopPropagation()
this.cloneOrEditMethod(method)
}
} else {
const files = Array.prototype.slice.call(ev.dataTransfer.files)
const jsons = files.filter(f=>f.type === "application/json")
if(confirm("Confirm import of method files?")){
this.importMethodsfiles)
}
}
if(ev.dataTransfer && ev.dataTransfer.getData('text/plain+ccpmethod')){
const method = JSON.parse(ev.dataTransfer.getData('application/json+ccpmethod'))
ev.stopImmediatePropagation()
ev.preventDefault()
ev.stopPropagation()
this.cloneOrEditMethod(method)
}
})
this.#rootdoc.addEventListener("dragover", ev=>{