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

Limiting an element to content-box while attaching to window/scrollParent #44

Closed
kizu opened this issue May 27, 2014 · 1 comment
Closed

Comments

@kizu
Copy link

kizu commented May 27, 2014

I have a case a bit similar to the content-visible one: I need to have an element that would be attached to the visible parts of another element, like in the example, but with a condition: it should never leave the bounds of the .content-box. It should pin to its top and bottom when it is placed outside the .content-box, while in all other time be positioned to a visible part of it.

Is it possible using constraints? I couldn't make it so, the most closest thing that I thought should work like I'd like was

  constraints: [
    {
      to: '.content-box',
      pin: true
    },
  ]

But it just doing anything and I couldn't find anything that would make it work.

Is it possible with Tether at all?

@kizu
Copy link
Author

kizu commented May 27, 2014

Ok, I've overlooked that while you can use “selector string of an element” for element and target, you can't use it for to in constraints, only the “A DOM element” would work.

Using the DOM element would do exactly what I need, so I'm closing this issue.

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

No branches or pull requests

1 participant