feat: add arrow start offset option for improved arrow positioning#225
Open
DevArches wants to merge 3 commits intoClariity:mainfrom
Open
feat: add arrow start offset option for improved arrow positioning#225DevArches wants to merge 3 commits intoClariity:mainfrom
DevArches wants to merge 3 commits intoClariity:mainfrom
Conversation
- Introduced a new `arrowStartOffset` property to control the starting position of arrows relative to the square's center. - Updated the ArrowOptions story to include a range input for adjusting the start offset. - Modified arrow rendering logic to account for the new start offset, enhancing visual accuracy.
|
@DevArches is attempting to deploy a commit to the Ryan Gregory's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
Should be ready now. Just wanted to update some variable names and comments and then forgot to use prettier to format. This could be a nice improvement for my project that has some learning features like showing all possible moves a piece has. And since sometimes that can be in all directions, thats a lot of arrows covering up a piece. |
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.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Adds a new arrowStartOffset property to arrowOptions that controls how far from the center of the starting square an arrow begins, as a fraction of the square width. This allows developers to offset arrow origins toward the edge of the square for a cleaner look (similar to chess.com), where arrows emerge from the base of a piece rather than its center.
Based on this issue #222
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:
Screenshots (if appropriate):
Before:

After:

Additional context
Add any other context about the pull request here.