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=>{ this.#rootdoc.addEventListener("drop", ev=>{
if(ev.dataTransfer && ev.dataTransfer.files.length === 0){ if(ev.dataTransfer && ev.dataTransfer.getData('text/plain+ccpmethod')){
if(ev.dataTransfer.getData('text/plain+ccpmethod')){ const method = JSON.parse(ev.dataTransfer.getData('application/json+ccpmethod'))
const method = JSON.parse(ev.dataTransfer.getData('application/json+ccpmethod')) ev.stopImmediatePropagation()
ev.stopImmediatePropagation() ev.preventDefault()
ev.preventDefault() ev.stopPropagation()
ev.stopPropagation() this.cloneOrEditMethod(method)
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)
}
}
}) })
this.#rootdoc.addEventListener("dragover", ev=>{ this.#rootdoc.addEventListener("dragover", ev=>{