Skip to content

Feature/position values to specify the arrow head positions and snapping points #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 12, 2025

Conversation

whitphx
Copy link
Owner

@whitphx whitphx commented Aug 12, 2025

Resolves #148

Copy link

changeset-bot bot commented Aug 12, 2025

🦋 Changeset detected

Latest commit: b3e9d0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slidev-addon-fancy-arrow Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@whitphx whitphx changed the title Feature/relative values Feature/position values to specify the arrow head positions and snapping points Aug 12, 2025
@whitphx whitphx requested a review from Copilot August 12, 2025 16:53
Copy link
Contributor

@Copilot 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 introduces support for position values to specify arrow head positions and snapping points using both absolute pixel values and percentage-based positioning. This enhancement allows for more precise control over where arrows connect to target elements.

  • Replaces the previous absolute positioning system with a flexible position system supporting both pixels and percentages
  • Updates the parsing logic to handle position values with unit specifications (px, %)
  • Adds comprehensive test coverage for the new position parsing functionality

Reviewed Changes

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

Show a summary per file
File Description
slides.md Demo slide showing usage of percentage and pixel-based positioning
components/parse-option.ts Core parsing logic for position values with unit support
components/use-element-position.ts Position resolution logic updated to handle new Position type
components/FancyArrow.vue Type imports updated to use new SnapAnchorPoint type
components/parse-option.test.ts Test cases for new position parsing functionality
.changeset/clever-moments-judge.md Changeset documentation for the feature

whitphx and others added 4 commits August 13, 2025 01:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@whitphx whitphx merged commit 7bc1577 into main Aug 12, 2025
7 checks passed
@whitphx whitphx deleted the feature/relative-values branch August 12, 2025 17:05
@github-actions github-actions bot mentioned this pull request Aug 12, 2025
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.

Snap position by (x, y) coordinates with percentage
1 participant