bugfix
This commit is contained in:
parent
3fbc12b8b5
commit
2882e7e365
@ -181,7 +181,7 @@ export function SolveDragCanvasWithLeak(viewContainer: ViewContainer) {
|
||||
|
||||
let translateY = event.matrix[7],
|
||||
dy = translateY - viewContainer.lastLeakAreaTranslateY;
|
||||
|
||||
|
||||
viewContainer.lastLeakAreaTranslateY = translateY;
|
||||
|
||||
viewContainer.leakAreaY = viewContainer.leakAreaY + dy;
|
||||
|
||||
@ -61,7 +61,7 @@ export function InitG6Behaviors(engine: Engine, viewContainer: ViewContainer): M
|
||||
|
||||
let node: SVNode = g6Item.SVModel;
|
||||
|
||||
if (g6Item === null || node.isNode() === false) {
|
||||
if (node.isNode() === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -256,20 +256,24 @@ export class Reconcile {
|
||||
let { duration, timingFunction } = this.engine.animationOptions;
|
||||
|
||||
appendModels.forEach(item => {
|
||||
const G6Item = item.G6Item;
|
||||
|
||||
if (item instanceof SVNodeAppendage) {
|
||||
G6Item.enableCapture(false);
|
||||
|
||||
// 先不显示泄漏区节点上面的地址文本
|
||||
if (item instanceof SVAddressLabel) {
|
||||
// 先将透明度改为0,隐藏掉
|
||||
const AddressLabelG6Group = item.G6Item.getContainer();
|
||||
const AddressLabelG6Group = G6Item.getContainer();
|
||||
AddressLabelG6Group.attr({ opacity: 0 });
|
||||
} else {
|
||||
Animations.FADE_IN(item.G6Item, {
|
||||
Animations.FADE_IN(G6Item, {
|
||||
duration,
|
||||
timingFunction,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Animations.APPEND(item.G6Item, {
|
||||
Animations.APPEND(G6Item, {
|
||||
duration,
|
||||
timingFunction,
|
||||
callback: () => item.afterRender(),
|
||||
|
||||
@ -47,6 +47,7 @@ export class ViewContainer {
|
||||
this.hasLeak = false; // 判断是否已经发生过泄漏
|
||||
this.brushSelectedModels = [];
|
||||
this.clickSelectNode = null;
|
||||
this.lastLeakAreaTranslateY = 0;
|
||||
|
||||
const g6Instance = this.renderer.getG6Instance(),
|
||||
leakAreaHeight = this.engine.viewOptions.leakAreaHeight,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user