* Update auto-scroll based on mouse Y position within canvas
(offsetY: number, canvasHeight: number)
| 671 | * Update auto-scroll based on mouse Y position within canvas |
| 672 | */ |
| 673 | private updateAutoScroll(offsetY: number, canvasHeight: number): void { |
| 674 | const edgeSize = SelectionManager.AUTO_SCROLL_EDGE_SIZE; |
| 675 | |
| 676 | if (offsetY < edgeSize) { |
| 677 | // Near top edge - scroll up |
| 678 | this.startAutoScroll(-1); |
| 679 | } else if (offsetY > canvasHeight - edgeSize) { |
| 680 | // Near bottom edge - scroll down |
| 681 | this.startAutoScroll(1); |
| 682 | } else { |
| 683 | // In middle - stop scrolling |
| 684 | this.stopAutoScroll(); |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Start auto-scrolling in the given direction |
no test coverage detected