From 1fd80dfab24aea14200718bffab5670916066699 Mon Sep 17 00:00:00 2001 From: Ruslan Lekhman Date: Sun, 27 Nov 2016 18:50:32 +0200 Subject: [PATCH] vivus: updated to 0.4.0 --- vivus/index-tests.ts | 4 +++- vivus/index.d.ts | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/vivus/index-tests.ts b/vivus/index-tests.ts index aefe0109ee..ab463124ef 100644 --- a/vivus/index-tests.ts +++ b/vivus/index-tests.ts @@ -50,9 +50,11 @@ new Vivus(el, { duration: 200, delay: 199 }) // 'type' option tests. new Vivus(el, { type: "delayed" }); -new Vivus(el, { type: "async" }); +new Vivus(el, { type: "sync" }); new Vivus(el, { type: "oneByOne" }); new Vivus(el, { type: "script" }); +new Vivus(el, { type: "scenario" }); +new Vivus(el, { type: "scenario-sync" }); // 'start' option tests. diff --git a/vivus/index.d.ts b/vivus/index.d.ts index 0c2f8b0ca5..f9708b4ce3 100644 --- a/vivus/index.d.ts +++ b/vivus/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for Vivus 0.3.2 +// Type definitions for Vivus 0.4.0 // Project: http://maxwellito.github.io/vivus/ -// Definitions by: Daniel Rosenwasser +// Definitions by: Daniel Rosenwasser , Ruslan Lekhman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = Vivus; @@ -24,10 +24,11 @@ declare class Vivus { * Plays the animation with the speed given in parameter. * A speed of `1` is the normal speed. * This value can be negative to go reverse, between 0 and 1 to play slowly, or greater than 1 to go faster. + * Callback executed after the animation is finished (optional). * * (default: `1`) */ - play(speed?: number): this; + play(speed?: number, callback?: () => void): this; /** * Stops the animation. @@ -67,10 +68,10 @@ declare namespace Vivus { export interface VivusOptions { /** * Determines if the item must be drawn asynchronously or not. - * Can be `'delayed'`, `'async'`, `'oneByOne'`, or `'script'`. + * Can be `'delayed'`, `'sync'`, `'oneByOne'`, `'script'`, `'scenario'`, or `'scenario-sync'`. * (default: `'delayed'`) */ - type?: 'delayed' | 'async' | 'oneByOne' | 'script'; + type?: 'delayed' | 'sync' | 'oneByOne' | 'script' | 'scenario' | 'scenario-sync'; /** * Link to the SVG to animate. * If set, Vivus will create an object tag and append it to the DOM element given to the constructor. @@ -124,6 +125,14 @@ declare namespace Vivus { * See [the troubleshooting documentation for more details](https://github.com/maxwellito/vivus#troubleshoot). */ forceRender?: boolean; + /** + * Reverse the order of execution. + * The default behaviour is to render from the first 'path' in the SVG to the last one. + * This option allow you to reverse the order. + * + * (default: `false`) + */ + reverseStack?: boolean; /** * Removes all extra styling on the SVG, and leaves it as original. */