@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.
@@ -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
  }