added input handler for direct modification

This commit is contained in:
dcore94 2024-06-03 21:12:10 +02:00
parent ec93d76998
commit ae38f41ac7
1 changed files with 9 additions and 1 deletions

View File

@ -888,7 +888,7 @@ class CCPGeoInputWidgetController extends CCPBaseInputWidgetController {
ev.preventDefault()
ev.stopPropagation()
}
})
})
document.addEventListener("keydown", ev=>{
if (ev.ctrlKey && ev.key === 'z') {
@ -933,8 +933,16 @@ class CCPGeoInputWidgetController extends CCPBaseInputWidgetController {
ev.preventDefault()
ev.stopPropagation()
})
this.rootdoc.addEventListener("input", ev=>{
if(ev.getAttribute("name") === this.name && this.getAttribute("data-index")){
const index = Number(this.getAttribute("data-index"))
this.value[index] = ev.target.value
}
})
}
init(){
this.#widget = this.rootdoc.querySelector("div[name=map]")
this.#draw = null