Skip to content

Commit

Permalink
fix(Morphing Interactions): Fixed morphing interactions restarting on…
Browse files Browse the repository at this point in the history
… second half, bumped version
  • Loading branch information
samuelOsborne committed Jun 20, 2021
1 parent ce701b9 commit a80f9aa
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 a80f9aa

Please sign in to comment.