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

Add from to bounds coordinates value #114

Open
PuruVJ opened this issue Jan 18, 2023 · 0 comments
Open

Add from to bounds coordinates value #114

PuruVJ opened this issue Jan 18, 2023 · 0 comments
Labels
core Related to core library

Comments

@PuruVJ
Copy link
Owner

PuruVJ commented Jan 18, 2023

When you provide this object to bounds

{
  top: 0,
  bottom: 20,
  left: 30,
  right: 40
}

This is fixed to window. I am gonna provide a new from property to which you specify a selector or pass an element to it. Then the bounds will be calculated wrt to that element.

Example:

{
  from: '.main-el'
  top: 20
}

// OR

```ts
{
  from: document.querySelector('.main-el')
  top: 20
}
@PuruVJ PuruVJ added the core Related to core library label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library
Projects
None yet
Development

No branches or pull requests

1 participant