Merge branch 'branch_cjc1' into 'main'
修改上一步泄漏区不能变红的bug See merge request phenomLi/StructV2!22
This commit is contained in:
commit
bd6f9cd0d4
@ -168,12 +168,18 @@ export class Reconcile {
|
||||
return removedModels;
|
||||
}
|
||||
|
||||
private getModelsById(ids: string[], modelList: SVModel[]): SVModel[] {
|
||||
return modelList.filter(item =>
|
||||
// 在视图上所有model中根据id查找model
|
||||
private getModelsById(ids: string[], modelList: SVModel[], accumulateLeakModels: SVModel[]): SVModel[] {
|
||||
const updateModels = modelList.filter(item =>
|
||||
ids?.find(id => {
|
||||
return id === item.id;
|
||||
})
|
||||
);
|
||||
const updateLeakModels = accumulateLeakModels.filter(item =>
|
||||
ids?.find(id => {
|
||||
return id === item.id;
|
||||
}));
|
||||
return [ ...updateModels,...updateLeakModels];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,7 +422,7 @@ export class Reconcile {
|
||||
const appendModels: SVModel[] = this.getAppendModels(prevModelList, modelList, accumulateLeakModels);
|
||||
const removeModels: SVModel[] = this.getRemoveModels(prevModelList, modelList, accumulateLeakModels);
|
||||
const updateModels: SVModel[] = hasTriggerLastStep
|
||||
? [...this.getModelsById(this.prevUpdate.pop(), modelList)]
|
||||
? [...this.getModelsById(this.prevUpdate.pop(), modelList,accumulateLeakModels)]
|
||||
: [
|
||||
...this.getReTargetMarkers(prevModelList, modelList),
|
||||
...this.getLabelChangeModels(prevModelList, modelList),
|
||||
|
@ -226,6 +226,7 @@ export class ViewContainer {
|
||||
|
||||
const layoutMode = this.engine.viewOptions.layoutMode;
|
||||
this.accumulateLeakModels.push(...diffResult.LEAKED); // 对泄漏节点进行向后累积
|
||||
|
||||
this.renderer.build(renderModelList); // 首先在离屏canvas渲染先
|
||||
this.layoutProvider.layoutAll(layoutGroupTable, this.accumulateLeakModels, layoutMode); // 进行布局(设置model的x,y,样式等)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user