Skip to content

Add adjustable SVG stroke width (0px = off)#12

Merged
Shimo-1999 merged 3 commits intomainfrom
feat/svg-stroke-width
Oct 22, 2025
Merged

Add adjustable SVG stroke width (0px = off)#12
Shimo-1999 merged 3 commits intomainfrom
feat/svg-stroke-width

Conversation

@Shimo-1999
Copy link
Owner

No description provided.

@Shimo-1999 Shimo-1999 requested a review from Copilot October 21, 2025 21:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an adjustable stroke width control for SVG rendering, allowing users to customize the border thickness of rectangles or hide them entirely by setting the width to 0px.

  • Adds a new "stroke" input control to the UI with a default value of 0.5px
  • Passes stroke width parameter through all SVG generation and rendering functions
  • Implements conditional stroke rendering in Rust WASM code (0px = no stroke)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
web/index.html Adds stroke width input control to UI toolbar and updates layout widths
web/js/script.js Adds stroke width element reference, event handlers, and passes value to all visSvg calls
wasm/src/lib.rs Updates vis_svg function to accept stroke_width parameter and conditionally apply stroke attributes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

🚀 Preview is ready

"https://Shimo-1999.github.io/rectangle-fitting/pr-preview-12/"

This link auto-updates on every push to this PR.

github-actions bot added a commit that referenced this pull request Oct 21, 2025
@github-actions
Copy link
Contributor

🚀 Preview is ready

"https://Shimo-1999.github.io/rectangle-fitting/pr-preview-12/"

This link auto-updates on every push to this PR.

github-actions bot added a commit that referenced this pull request Oct 22, 2025
@github-actions
Copy link
Contributor

🚀 Preview is ready

"https://Shimo-1999.github.io/rectangle-fitting/pr-preview-12/"

This link auto-updates on every push to this PR.

github-actions bot added a commit that referenced this pull request Oct 22, 2025
@Shimo-1999 Shimo-1999 merged commit aabd04c into main Oct 22, 2025
4 checks passed
github-actions bot added a commit that referenced this pull request Oct 22, 2025
@Shimo-1999 Shimo-1999 deleted the feat/svg-stroke-width branch October 22, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants