mirror of
https://gitee.com/antv/g6.git
synced 2024-11-30 18:58:34 +08:00
perf: performance of update position
This commit is contained in:
parent
9b20b27d9d
commit
fde08a480b
@ -655,23 +655,17 @@ export class ItemController {
|
||||
onlyMove,
|
||||
animate,
|
||||
// call after updating finished
|
||||
throttle(
|
||||
(_, canceled) => {
|
||||
item.onframe?.(true);
|
||||
item.onframe = undefined;
|
||||
if (statesCache) {
|
||||
statesCache.forEach((state) =>
|
||||
this.graph.setItemState(id, state, true),
|
||||
);
|
||||
}
|
||||
callback(innerModel, canceled);
|
||||
},
|
||||
500,
|
||||
{
|
||||
leading: true,
|
||||
trailing: true,
|
||||
},
|
||||
),
|
||||
(_, canceled) => {
|
||||
// @ts-ignore
|
||||
debounceUpdateRelates(nodeRelatedIdsToUpdate);
|
||||
item.onframe = undefined;
|
||||
if (statesCache) {
|
||||
statesCache.forEach((state) =>
|
||||
this.graph.setItemState(id, state, true),
|
||||
);
|
||||
}
|
||||
callback(innerModel, canceled);
|
||||
},
|
||||
);
|
||||
|
||||
const parentItem = this.itemMap.get(current.parentId);
|
||||
|
@ -2,6 +2,10 @@
|
||||
title: CircularLayoutOptions
|
||||
---
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| :------- | :------- | :----------------------------- | :------------- |
|
||||
| `radius` | `number` | 画布宽度与高度较小者的二分之一 | 圆形布局的半径 |
|
||||
|
||||
> 📋 中文文档还在翻译中... 欢迎 PR
|
||||
|
||||
[Overview - v5.0.0-beta.21](../../README.zh.md) / [Modules](../../modules.zh.md) / [layout](../../modules/layout.zh.md) / CircularLayoutOptions
|
||||
|
Loading…
Reference in New Issue
Block a user