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

No documentation for Constraints. #40

Open
dustyjewett opened this issue Jan 28, 2017 · 4 comments
Open

No documentation for Constraints. #40

dustyjewett opened this issue Jan 28, 2017 · 4 comments

Comments

@dustyjewett
Copy link

No description provided.

@jfrux
Copy link

jfrux commented Mar 20, 2017

Yeah, would love to understand how this works... this plugin has zero documentation.

@dustyjewett
Copy link
Author

Turns out, it's the same as https://tether.io

@jfrux
Copy link

jfrux commented Mar 20, 2017

Right, so I'm guessing we have to make a component and extend the ember-tether component to add the constraints property? or do we just plug json directly into the helper?

@usrbowe
Copy link

usrbowe commented Aug 17, 2017

Constraints can be used like this:

template.hbs

{{#ember-tether
  target=targetElement
  targetAttachment="top right"
  attachment="top left"
  constraints=constraints
}}
  Tether content
{{/ember-tether}}

component.js

constraints: Ember.computed(function() {
  return [{
    to: 'scrollParent',
    attachment: 'together',
    pin: true,
  }];
}),

More examples: http://tether.io/ or live demo: http://yapplabs.github.io/ember-tether/

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

3 participants