Skip to content

Conversation

@Shreyanshi210205
Copy link
Contributor

@Shreyanshi210205 Shreyanshi210205 commented Oct 18, 2025

Description

The line tool in the canvas was not functioning , selecting it had no visible effect because the drawing logic only handled "pen" and "eraser" tools..

Added support for the "line" tool in Canvas.jsx.
Implemented logic to:
1.Store the starting point on mouse down.
2.Dynamically preview the line as the user drags the mouse.
3.Finalize the line on mouse release.
4.Ensured compatibility with existing tools (pen, eraser, etc.).
5.Added a small keyboard shortcut enhancement (L / 3 for line tool).

-Result: Users can now select the Line tool and draw straight lines smoothly on the canvas without affecting existing drawing tools.

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

#23

Checklist

@Ayushivam22 Ayushivam22 merged commit 28806d5 into OPCODE-Open-Spring-Fest:main Oct 19, 2025
4 of 6 checks passed
@Shreyanshi210205 Shreyanshi210205 deleted the shreyanshi_linetool branch October 19, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants