Search code examples
ember.jsember-cli

ember liquid-teather transitions.js


I am using ember liquid-teather - http://pzuraq.github.io/liquid-tether/#/examples?a=animation-with-context

The code I have used is from the example under 'Animation With Context'.

The modal works, but there is no nice transitions as am getting an error in the console re the transitions.js file.

See my transitions code below:

export default function(){
  this.transition(
    target('modal-dialog'),
    this.toValue(({ index: newIndex }, { index: oldIndex }) => newIndex > oldIndex),
    this.use('tether', ['to-left', options]),
    this.reverse('tether', ['to-right', options])
  );

  this.transition(
    target('modal-dialog'),
    this.toValue(({ index }) => index === 1),
    this.use('tether', 'fade', 'fade')
  );

  this.transition(
    target('modal-dialog'),
    this.toValue(({ index }) => !index),
    this.use('tether', 'fade', 'fade')
  );
}

The error is: target not defined.

How do I define target?

Thank you in advance! :-)


Solution

  • You can check here what values are allowed for options. http://tether.io/ Search under options :).