Skip to content

Commit

Permalink
Merge pull request #17 from samuelOsborne/FAST-migration
Browse files Browse the repository at this point in the history
fix(Morphing Interactions): Fixed morphing interactions restarting on second half, bumped version
  • Loading branch information
samuelOsborne authored Jun 20, 2021
2 parents 55812e6 + a80f9aa commit 0290345
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lottie-interactive",
"version": "1.2.4",
"version": "1.3.0",
"description": "A custom element that adds interactions and quality of life changes to Lottie animations.",
"main": "dist/lottie-interactive.js",
"types": "./types/lottie.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,9 @@ export class LottieInteractive extends FASTElement {
private data: any;

/**
* Array of all the possible interactions
* The currently used interaction on the animation
* @private
*/
//private interactions: Array<BaseInteraction>;
private currentInteraction: BaseInteraction;

/**
Expand Down
3 changes: 1 addition & 2 deletions src/interactions/morph-lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ export class MorphLock extends BaseInteraction {
this.direction = 1;
this.playing = true;
this.lottiePlayer.setDirection(this.direction);
this.lottiePlayer.goToAndPlay(0, true);
} else if (this.direction === 1) {
this.direction = -1;
this.playing = true;
this.lottiePlayer.setDirection(this.direction);
this.lottiePlayer.play();
}
this.lottiePlayer.play();
}

public playOnHover(): void {
Expand Down
3 changes: 1 addition & 2 deletions src/interactions/morph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ export class Morph extends BaseInteraction {
this.direction = 1;
this.playing = true;
this.lottiePlayer.setDirection(this.direction);
this.lottiePlayer.goToAndPlay(0, true);
} else if (this.direction === 1) {
this.direction = -1;
this.playing = true;
this.lottiePlayer.setDirection(this.direction);
this.lottiePlayer.play();
}
this.lottiePlayer.play();
}

public playOnHover(): void {
Expand Down

0 comments on commit 0290345

Please sign in to comment.