Skip to content

The problem of using useElementBounding and useDraggable together #4625

Answered by dosubot bot
hzlzsm asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @hzlzsm! 👋 I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to solve the issue you're facing.

There are two similar closed issues related to your question, but neither provided a solution in the comments:

  1. The absolute/relative positioning makes the useDraggable element change its coordinates as moving starts [1].
  2. useElementBounding 的目标元素被flex包裹时,位置信息不会响应式更新 [2].

To address your issue, useElementBounding updates its values based on several conditions, such as resize and mutation observers, and window events like scroll and resize. However, it does not automatically update when the element is dragged using useDraggable [3].

To ensure u…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hzlzsm
Comment options

Answer selected by hzlzsm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant