Skip to content

fix(renderer): stroke dashed lines separately - #92

Open
Komzpa wants to merge 1 commit into
masterfrom
codex/do-not-batch-dashed-lines
Open

fix(renderer): stroke dashed lines separately#92
Komzpa wants to merge 1 commit into
masterfrom
codex/do-not-batch-dashed-lines

Conversation

@Komzpa

@Komzpa Komzpa commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • avoid batching dashed line and casing features into one accumulated canvas path
  • keep solid line batching intact for the existing performance path
  • add a regression test that proves dashed features get independent strokes while solid features still share a stroke

Fixes #61.

Validation

  • npm test

@Komzpa
Komzpa marked this pull request as ready for review May 17, 2026 16:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a36a2e196e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/renderer/line.js Outdated
Comment on lines +50 to +51
!style.dashes &&
!nextStyle.dashes &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Batch lines when dash pattern normalizes to solid

render now blocks batching whenever style.dashes is truthy, but Kothic.path treats many truthy dash values (for example [0, 0], [0, 2], or non-numeric entries) as solid by normalizing them to [] in src/renderer/path.js. In those cases, this change forces one stroke per feature even though the rendered line is solid, which regresses the “solid lines still share a stroke” behavior and can reintroduce per-feature seams/perf overhead on split geometries.

Useful? React with 👍 / 👎.

Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
@Komzpa
Komzpa force-pushed the codex/do-not-batch-dashed-lines branch from a36a2e1 to d541f3e Compare May 20, 2026 03:02
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.

close dashed lines merge to a solid line

1 participant