@logicflow/core 2.1.8 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$dev.log +2 -2
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +12 -0
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/model/GraphModel.js +1 -1
- package/es/model/edge/PolylineEdgeModel.d.ts +7 -0
- package/es/model/edge/PolylineEdgeModel.js +133 -6
- package/es/tool/MultipleSelectTool.js +4 -0
- package/es/view/overlay/CanvasOverlay.js +3 -0
- package/lib/model/GraphModel.js +1 -1
- package/lib/model/edge/PolylineEdgeModel.d.ts +7 -0
- package/lib/model/edge/PolylineEdgeModel.js +133 -6
- package/lib/tool/MultipleSelectTool.js +4 -0
- package/lib/view/overlay/CanvasOverlay.js +3 -0
- package/package.json +1 -1
- package/src/model/GraphModel.ts +2 -1
- package/src/model/edge/PolylineEdgeModel.ts +159 -16
- package/src/tool/MultipleSelectTool.tsx +7 -0
- package/src/view/overlay/CanvasOverlay.tsx +2 -0
- package/stats.html +1 -1
|
@@ -27,6 +27,13 @@ export default class MultipleSelect extends Component<IToolProps> {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
handleMouseDown = (ev: MouseEvent) => {
|
|
30
|
+
// 多选区域的拖拽步长随缩放变化
|
|
31
|
+
const {
|
|
32
|
+
graphModel: { gridSize },
|
|
33
|
+
lf,
|
|
34
|
+
} = this.props
|
|
35
|
+
const { SCALE_X } = lf.getTransform()
|
|
36
|
+
this.stepDrag.setStep(gridSize * SCALE_X)
|
|
30
37
|
this.stepDrag.handleMouseDown(ev)
|
|
31
38
|
}
|
|
32
39
|
// 使多选区域的滚轮事件可以触发画布的滚轮事件
|
|
@@ -105,6 +105,8 @@ export class CanvasOverlay extends Component<IProps, IState> {
|
|
|
105
105
|
if (selectElements.size > 0) {
|
|
106
106
|
graphModel.clearSelectElements()
|
|
107
107
|
}
|
|
108
|
+
// 如果是拖拽状态,不触发点击事件
|
|
109
|
+
if (this.state.isDragging) return
|
|
108
110
|
graphModel.eventCenter.emit(EventType.BLANK_CLICK, { e: ev })
|
|
109
111
|
}
|
|
110
112
|
}
|