Skip to content

Commit

Permalink
feat(core): trigger edge:adjust when adjusting bezier(#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
wumail authored and boyongjiong committed Sep 11, 2023
1 parent d13fc5c commit ad993c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/view/overlay/BezierAdjustOverlay.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -44,6 +44,9 @@ class BezierAdjustAnchor extends Component<IAnchorProps, IState> {
y: event.clientY,
});
bezierModel.updateAdjustAnchor({ x, y }, type);
graphModel.eventCenter.emit(EventType.EDGE_ADJUST, {
data: bezierModel.getData(),
});
};
onDragEnd = (() => {
const { bezierModel } = this.props;
Expand Down

0 comments on commit ad993c4

Please sign in to comment.