Skip to content
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

Feature request: Allow anchors to be placed absolutely or a percentage of total width/height #189

Open
samesfahani-tuplehealth opened this issue Mar 17, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@samesfahani-tuplehealth

At the moment, anchors are placed in the middle of the elements (I imagine there is a lot of division by 2 in the code). The feature I am requesting is something like:

<AnchorElement
  id="el1"
  relations={[{ targetId: "el2", sourceAnchor: 'right', targetAnchor: 'left', "sourceAnchorPosition": "10%", "targetAnchorPosition": 10 }]}
>

Where the source anchor starts from 10% of total height and ends 10px down from el2's height.

@samesfahani-tuplehealth samesfahani-tuplehealth changed the title Feature request: Allow anchors to be placed absolutely or a percentage of total width Feature request: Allow anchors to be placed absolutely or a percentage of total width/height Mar 17, 2023
@pierpo pierpo added the enhancement New feature or request label Mar 18, 2023
@pierpo
Copy link
Owner

pierpo commented Mar 18, 2023

Hey, that's a brilliant suggestion 😊
The API looks fine to me.
It sounds feasible, and should not be too hard indeed.

PR welcome if you need this quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants