motion-v 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -7944,7 +7944,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7944
7944
|
this.resumingFrom = this.resumeFrom;
|
|
7945
7945
|
this.resumingFrom.resumingFrom = void 0;
|
|
7946
7946
|
}
|
|
7947
|
-
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7948
7947
|
const animationOptions = {
|
|
7949
7948
|
...getValueTransition$1(layoutTransition, "layout"),
|
|
7950
7949
|
onPlay: onLayoutAnimationStart,
|
|
@@ -7955,6 +7954,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7955
7954
|
animationOptions.type = false;
|
|
7956
7955
|
}
|
|
7957
7956
|
this.startAnimation(animationOptions);
|
|
7957
|
+
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7958
7958
|
} else {
|
|
7959
7959
|
if (!hasLayoutChanged) {
|
|
7960
7960
|
finishAnimation(this);
|
|
@@ -22,12 +22,14 @@ class JSAnimation extends WithPromise {
|
|
|
22
22
|
this.currentTime = 0;
|
|
23
23
|
this.holdTime = null;
|
|
24
24
|
this.playbackSpeed = 1;
|
|
25
|
-
this.stop = () => {
|
|
25
|
+
this.stop = (sync = true) => {
|
|
26
26
|
var _a, _b;
|
|
27
|
+
if (sync) {
|
|
27
28
|
const { motionValue } = this.options;
|
|
28
29
|
if (motionValue && motionValue.updatedAt !== time.now()) {
|
|
29
30
|
this.tick(time.now());
|
|
30
31
|
}
|
|
32
|
+
}
|
|
31
33
|
this.isStopped = true;
|
|
32
34
|
if (this.state === "idle")
|
|
33
35
|
return;
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts seconds to milliseconds
|
|
3
|
-
*
|
|
4
|
-
* @param seconds - Time in seconds.
|
|
5
|
-
* @return milliseconds - Converted time in milliseconds.
|
|
6
|
-
*/
|
|
7
|
-
export declare const secondsToMilliseconds: (seconds: number) => number;
|
|
8
|
-
export declare function millisecondsToSeconds(milliseconds: number): number;
|