File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -513,6 +513,17 @@ export class SelectionManager {
513513 // Document-level mousemove for tracking mouse position during drag outside canvas
514514 this . boundDocumentMouseMoveHandler = ( e : MouseEvent ) => {
515515 if ( this . isSelecting ) {
516+ // Check drag threshold (same as canvas mousemove)
517+ if ( ! this . dragThresholdMet ) {
518+ const dx = e . clientX - ( canvas . getBoundingClientRect ( ) . left + this . mouseDownX ) ;
519+ const dy = e . clientY - ( canvas . getBoundingClientRect ( ) . top + this . mouseDownY ) ;
520+ const threshold = this . renderer . getMetrics ( ) . width * 0.5 ;
521+ if ( dx * dx + dy * dy < threshold * threshold ) {
522+ return ;
523+ }
524+ this . dragThresholdMet = true ;
525+ }
526+
516527 const rect = canvas . getBoundingClientRect ( ) ;
517528
518529 // Update selection based on clamped position
You can’t perform that action at this time.
0 commit comments