mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复【浮窗】-拖拽机器人时应该跟随鼠标移动 (#869)
This commit is contained in:
parent
da11d771d7
commit
cb3357aeb8
|
|
@ -87,11 +87,13 @@ const initChat=(root)=>{
|
|||
closeviewport.classList.remove('maxkb-viewportnone')
|
||||
}
|
||||
}
|
||||
if({{is_draggable}}){
|
||||
chat_button.addEventListener("dragend",(e)=>{
|
||||
const drag=(e)=>{
|
||||
chat_button.style.top=(e.y-25)+'px'
|
||||
chat_button.style.left=(e.x-25)+'px'
|
||||
})
|
||||
}
|
||||
if({{is_draggable}}){
|
||||
chat_button.addEventListener("drag",drag)
|
||||
chat_button.addEventListener("dragend",drag)
|
||||
}
|
||||
viewport.onclick=viewport_func
|
||||
closeviewport.onclick=viewport_func
|
||||
|
|
|
|||
Loading…
Reference in New Issue