The bar length now updates in real-time as you drag! Problem: When dragging, all conversions recalculate proportionally, causing relative percentages to stay the same (no visual change in bar length). Solution: Track draggedPercentage state and display it directly on the bar being dragged, bypassing the calculated percentage from conversions. How it works: - Added draggedPercentage state to track the current drag position - Updated handleMouseMove/handleTouchMove to set draggedPercentage - Use draggedPercentage for the dragging bar, calculated percentage for others - Clear draggedPercentage on drag end (mouseup/touchend) - Bar width and percentage label both use displayPercentage Now when you drag a bar, you get instant visual feedback as the bar resizes to follow your cursor, making the interaction feel responsive and tactile. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
9.8 KiB
9.8 KiB