ember-tether icon indicating copy to clipboard operation
ember-tether copied to clipboard

No documentation for Constraints.

Open dustyjewett opened this issue 8 years ago • 4 comments

dustyjewett avatar Jan 28 '17 19:01 dustyjewett

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

jfrux avatar Mar 20 '17 18:03 jfrux

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

dustyjewett avatar Mar 20 '17 18:03 dustyjewett

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?

jfrux avatar Mar 20 '17 18:03 jfrux

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/

usrbowe avatar Aug 17 '17 12:08 usrbowe