Skip to content

feat: movable-view change 事件支持UI线程调用 - #2506

Open
yandadaFreedom wants to merge 10 commits into
masterfrom
feat-movable-worklet-event
Open

feat: movable-view change 事件支持UI线程调用#2506
yandadaFreedom wants to merge 10 commits into
masterfrom
feat-movable-worklet-event

Conversation

@yandadaFreedom

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread packages/webpack-plugin/lib/runtime/components/react/mpx-movable-view.tsx Outdated
Comment thread packages/webpack-plugin/lib/runtime/components/react/mpx-movable-view.tsx Outdated

@hiyuki hiyuki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发现一个会导致 workletChange 与实际动画位置不同步的问题,建议修复后再合并。

friction,
() => {
xInertialMotion.value = false
(finished) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 这里只在 withTiming 完成后触发一次 workletChange,惯性动画期间 offsetX/offsetY 持续变化却没有回调;上面的越界回弹和受控 x/y 动画则会在动画刚开始时直接回调目标坐标。依赖该回调同步其他 UI 的场景会在动画期间冻结或提前跳到终点,与“位置变化时在 UI 线程立即触发”的语义不符。建议通过 useAnimatedReaction(或统一的共享位置观察路径)监听 offsetX/offsetY 的实际变化,并用 shared value 标记 touch / friction / out-of-bounds source。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants