How to use the velocity.RunSequence function in velocity

To help you get started, we’ve selected a few velocity examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gooy / aurelia-animator-velocity / src / animator.js View on Github external
return new Promise((resolve, reject) => {
      this.sequenceReject = resolve;
      var last = sequence[sequence.length-1];
      last.options = last.options||last.o||{};
      last.options.complete = ()=>{
        if(!this.sequenceReject) return;
        this.sequenceReject = undefined;
        dispatch(window,"sequenceDone");
        resolve();
      };
      try{
        Velocity.RunSequence(sequence);
      }catch(e){
        this.stopSequence(sequence);
        this.sequenceReject(e);
      }
    });
  }
github gooy / aurelia-animator-velocity / dist / es6 / animator.js View on Github external
return new Promise((resolve, reject) => {
      this.sequenceReject = resolve;
      var last = sequence[sequence.length-1];
      last.options = last.options||last.o||{};
      last.options.complete = ()=>{
        if(!this.sequenceReject) return;
        this.sequenceReject = undefined;
        dispatch(window,"sequenceDone");
        resolve();
      };
      try{
        Velocity.RunSequence(sequence);
      }catch(e){
        this.stopSequence(sequence);
        this.sequenceReject(e);
      }
    });
  }