mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 10:45:52 +00:00
修复拖动聊天图标容易中断问题 (#1194)
This commit is contained in:
@@ -76,7 +76,8 @@ function embedChatbot() {
|
|||||||
|
|
||||||
chatBtnDown = true;
|
chatBtnDown = true;
|
||||||
});
|
});
|
||||||
ChatBtn.addEventListener('mousemove', (e) => {
|
|
||||||
|
window.addEventListener('mousemove', (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!canDrag || !chatBtnDown) return;
|
if (!canDrag || !chatBtnDown) return;
|
||||||
|
|
||||||
@@ -86,12 +87,8 @@ function embedChatbot() {
|
|||||||
|
|
||||||
ChatBtn.style.transform = `translate3d(${transformX}px, ${transformY}px, 0)`;
|
ChatBtn.style.transform = `translate3d(${transformX}px, ${transformY}px, 0)`;
|
||||||
});
|
});
|
||||||
ChatBtn.addEventListener('mouseup', (e) => {
|
|
||||||
chatBtnDragged = false;
|
|
||||||
chatBtnDown = false;
|
|
||||||
});
|
|
||||||
window.addEventListener('mouseup', (e) => {
|
window.addEventListener('mouseup', (e) => {
|
||||||
chatBtnDragged = false;
|
|
||||||
chatBtnDown = false;
|
chatBtnDown = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user