File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ export class SelectionManager {
4343 private selectionStart : { col : number ; absoluteRow : number } | null = null ;
4444 private selectionEnd : { col : number ; absoluteRow : number } | null = null ;
4545 private isSelecting : boolean = false ;
46- private static readonly DRAG_THRESHOLD_PX = 5 ;
4746 private mouseDownX : number = 0 ;
4847 private mouseDownY : number = 0 ;
4948 private dragThresholdMet : boolean = false ;
@@ -470,10 +469,9 @@ export class SelectionManager {
470469 if ( ! this . dragThresholdMet ) {
471470 const dx = e . offsetX - this . mouseDownX ;
472471 const dy = e . offsetY - this . mouseDownY ;
473- if (
474- dx * dx + dy * dy <
475- SelectionManager . DRAG_THRESHOLD_PX * SelectionManager . DRAG_THRESHOLD_PX
476- ) {
472+ // Use 50% of cell width as threshold to scale with font size
473+ const threshold = this . renderer . getMetrics ( ) . width * 0.5 ;
474+ if ( dx * dx + dy * dy < threshold * threshold ) {
477475 return ; // Below threshold, ignore
478476 }
479477 this . dragThresholdMet = true ;
You can’t perform that action at this time.
0 commit comments