feat(core): add arrow snap-to-shape connection points#35
Merged
Conversation
Arrows now snap to 8 connection points on shapes (4 corners + 4 edge midpoints) when dragged within 15px. Visual indicator dot appears at candidate snap point. Bound arrows auto-update when connected shape is moved or resized. Works for Rectangle, Ellipse, and Diamond shapes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Existing coverage is per-module unit tests. This adds a tests/integration.rs exercising draw-core as an external consumer would — only `pub use` re-exports from the crate root. New coverage: - Full pipeline across all 7 element types: new -> populate -> JSON round-trip -> save/load -> SVG export (per-type tag checks) -> PNG export (magic bytes) - Arrow start_binding/end_binding round-trip (Binding added in #35, had no test coverage) - Legacy doc parsing when binding fields are absent (serde default=None) - Element dispatch helpers (id/position/set_position/opacity/is_locked/group_id) across every variant - Empty-document SVG/PNG exports don't panic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Existing coverage is per-module unit tests. This adds a tests/integration.rs exercising draw-core as an external consumer would — only `pub use` re-exports from the crate root. New coverage: - Full pipeline across all 7 element types: new -> populate -> JSON round-trip -> save/load -> SVG export (per-type tag checks) -> PNG export (magic bytes) - Arrow start_binding/end_binding round-trip (Binding added in #35, had no test coverage) - Legacy doc parsing when binding fields are absent (serde default=None) - Element dispatch helpers (id/position/set_position/opacity/is_locked/group_id) across every variant - Empty-document SVG/PNG exports don't panic Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Bumps all Rust crates and the Python package from 0.2.1 to 0.3.0. This minor bump reflects one breaking change in the dkdc-draw-core public API surface (pub -> pub(crate) demotions in #42), accumulated with the non-breaking work from this cycle: - #35: arrow snap-to-shape connection points - #36: CONTRIBUTING.md + README badges - #37: integration tests for draw-core public API - #38: Rust + Python hello-world examples - #39: CHANGELOG.md scaffolding - #40: surgical clippy opt-ins workspace-wide - #41: sample gallery (5 drawings × json/svg/png) - #42: pub -> pub(crate) demotions (BREAKING) - #43: Python test coverage 5 -> 27 See CHANGELOG.md for the 0.3.0 section and migration notes for the demoted symbols. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
4 tasks
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Bumps all Rust crates and the Python package from 0.2.1 to 0.3.0. This minor bump reflects one breaking change in the dkdc-draw-core public API surface (pub -> pub(crate) demotions in #42), accumulated with the non-breaking work from this cycle: - #35: arrow snap-to-shape connection points - #36: CONTRIBUTING.md + README badges - #37: integration tests for draw-core public API - #38: Rust + Python hello-world examples - #39: CHANGELOG.md scaffolding - #40: surgical clippy opt-ins workspace-wide - #41: sample gallery (5 drawings × json/svg/png) - #42: pub -> pub(crate) demotions (BREAKING) - #43: Python test coverage 5 -> 27 See CHANGELOG.md for the 0.3.0 section and migration notes for the demoted symbols. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
🤖 Generated with Claude Code