antvis / antvis/F6

force布局,小程序demo设置局部渲染,长时间不出图

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
bug👾
Dominant language
JavaScript
Stars
147
Forks
24
PR merge metrics
No merged PRs in 30d

Description

力导布局,在支付宝小程序里。没有一开始的连续布局的动画效果,直到布局计算完成后最后一帧才会出图。表现就像是卡住白屏了。
设置非局部渲染``` graph.get('canvas').set('localRefresh', false) ```后,可以看到前面的动画效果。

目前排查到在drawRegion时,计算出来的脏区域总是null,导致总是跳出渲染。

调用链路:[_drawRegion](https://github.com/antvis/g/blob/a7f058fcec85457c65500226d1aca5c4a9cce0d1/packages/g-mobile/src/canvas.ts#L239) -> [_getRefreshRegion](https://github.com/antvis/g/blob/a7f058fcec85457c65500226d1aca5c4a9cce0d1/packages/g-mobile/src/canvas.ts#L256) -> [getMergedRegion](https://github.com/antvis/g/blob/a7f058fcec85457c65500226d1aca5c4a9cce0d1/packages/g-mobile/src/canvas.ts#L196)

getMergedRegion函数返回的区域不是很正常,如下图:
![image](https://user-images.githubusercontent.com/7451866/133257369-3f109673-cd2b-4a83-a9b5-58d5fbecc3c0.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with packages/g-mobile/src/canvas.ts and trace _drawRegion through _getRefreshRegion to getMergedRegion. Reproduce the force-layout demo in the Alipay mini-program with localRefresh enabled, compare it with localRefresh disabled, and verify that valid dirty regions allow intermediate layout frames to render instead of waiting for the final frame.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.