undone wrong update
This commit is contained in:
parent
2665ac4d58
commit
688b240d72
|
@ -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=>{
|
||||||
|
|
Loading…
Reference in New Issue