Skip to content

Commit

Permalink
Fixed modals initially slightly off-set when click-dragging ↞ [auto-s…
Browse files Browse the repository at this point in the history
…ync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jul 10, 2024
1 parent eb91fb9 commit 59f97f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.7.10.3
// @version 2024.7.10.4
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -562,8 +562,8 @@
event.preventDefault(); // prevent sub-elems like icons being draggable
['mousemove', 'mouseup'].forEach(event => document.addEventListener(event, modals.dragHandlers[event]))
const draggableElemRect = modals.dragHandlers.draggableElem.getBoundingClientRect()
modals.dragHandlers.offsetX = event.clientX - draggableElemRect.left
modals.dragHandlers.offsetY = event.clientY - draggableElemRect.top
modals.dragHandlers.offsetX = event.clientX - draggableElemRect.left +21
modals.dragHandlers.offsetY = event.clientY - draggableElemRect.top +12
},

mousemove(event) { // drag modal
Expand Down

0 comments on commit 59f97f4

Please sign in to comment.