From ad993c448c004623e32f9534b3971cdf9d8e47bd Mon Sep 17 00:00:00 2001 From: wumail <1059037014@qq.com> Date: Fri, 8 Sep 2023 17:51:59 +0800 Subject: [PATCH] feat(core): trigger edge:adjust when adjusting bezier(#947) --- packages/core/src/view/overlay/BezierAdjustOverlay.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/view/overlay/BezierAdjustOverlay.tsx b/packages/core/src/view/overlay/BezierAdjustOverlay.tsx index bc65e0eb4..6fcfaf262 100644 --- a/packages/core/src/view/overlay/BezierAdjustOverlay.tsx +++ b/packages/core/src/view/overlay/BezierAdjustOverlay.tsx @@ -1,5 +1,5 @@ import { Component, h } from 'preact'; -import { ModelType } from '../../constant/constant'; +import { EventType, ModelType } from '../../constant/constant'; import BezierEdgeModel from '../../model/edge/BezierEdgeModel'; import GraphModel from '../../model/GraphModel'; import { Point } from '../../type'; @@ -44,6 +44,9 @@ class BezierAdjustAnchor extends Component { y: event.clientY, }); bezierModel.updateAdjustAnchor({ x, y }, type); + graphModel.eventCenter.emit(EventType.EDGE_ADJUST, { + data: bezierModel.getData(), + }); }; onDragEnd = (() => { const { bezierModel } = this.props;