File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
packages/core/src/composables Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @vue-flow/core " : patch
3
+ ---
4
+
5
+ Prevent drag-click handler when multi selection is active.
Original file line number Diff line number Diff line change @@ -229,24 +229,14 @@ export function useDrag(params: UseDragParams) {
229
229
}
230
230
231
231
const eventEnd = ( event : UseDragEvent ) => {
232
- if ( ! dragStarted ) {
233
- const pointerPos = getPointerPosition ( event )
234
-
235
- const x = pointerPos . xSnapped - ( lastPos . x ?? 0 )
236
- const y = pointerPos . ySnapped - ( lastPos . y ?? 0 )
237
- const distance = Math . sqrt ( x * x + y * y )
238
-
239
- // dispatch a click event if the node was attempted to be dragged but the threshold was not exceeded
240
- if ( distance !== 0 && distance <= nodeDragThreshold . value ) {
241
- onClick ?.( event . sourceEvent )
242
- }
243
-
244
- return
232
+ if ( ! dragging . value && ! multiSelectionActive . value ) {
233
+ onClick ?.( event . sourceEvent )
245
234
}
246
235
247
236
dragging . value = false
248
237
autoPanStarted = false
249
238
dragStarted = false
239
+ lastPos = { x : undefined , y : undefined }
250
240
251
241
cancelAnimationFrame ( autoPanId )
252
242
You can’t perform that action at this time.
0 commit comments