j-templates 6.1.7 → 6.1.8
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/Utils/animation.d.ts +2 -2
- package/Utils/animation.js +7 -7
- package/package.json +1 -1
package/Utils/animation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDestroyable } from "./utils.types";
|
|
2
|
-
export declare enum
|
|
2
|
+
export declare enum AnimationType {
|
|
3
3
|
Linear = 0,
|
|
4
4
|
EaseIn = 1
|
|
5
5
|
}
|
|
@@ -17,7 +17,7 @@ export declare class Animation implements IDestroyable {
|
|
|
17
17
|
get Start(): number;
|
|
18
18
|
get End(): number;
|
|
19
19
|
get Enabled(): boolean;
|
|
20
|
-
constructor(type:
|
|
20
|
+
constructor(type: AnimationType, duration: number, update: {
|
|
21
21
|
(next: number): void;
|
|
22
22
|
});
|
|
23
23
|
Animate(start: number, end: number): Promise<void>;
|
package/Utils/animation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Animation = exports.
|
|
3
|
+
exports.Animation = exports.AnimationType = void 0;
|
|
4
4
|
const domNodeConfig_1 = require("../DOM/domNodeConfig");
|
|
5
5
|
var StepFunctions;
|
|
6
6
|
(function (StepFunctions) {
|
|
@@ -20,11 +20,11 @@ var StepFunctions;
|
|
|
20
20
|
}
|
|
21
21
|
StepFunctions.Linear = Linear;
|
|
22
22
|
})(StepFunctions || (StepFunctions = {}));
|
|
23
|
-
var
|
|
24
|
-
(function (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})(
|
|
23
|
+
var AnimationType;
|
|
24
|
+
(function (AnimationType) {
|
|
25
|
+
AnimationType[AnimationType["Linear"] = 0] = "Linear";
|
|
26
|
+
AnimationType[AnimationType["EaseIn"] = 1] = "EaseIn";
|
|
27
|
+
})(AnimationType || (exports.AnimationType = AnimationType = {}));
|
|
28
28
|
class Animation {
|
|
29
29
|
get Running() {
|
|
30
30
|
return this.running;
|
|
@@ -61,7 +61,7 @@ class Animation {
|
|
|
61
61
|
this.start = start;
|
|
62
62
|
this.end = end;
|
|
63
63
|
return new Promise((resolve) => {
|
|
64
|
-
const stepFunc = StepFunctions[
|
|
64
|
+
const stepFunc = StepFunctions[AnimationType[this.type]];
|
|
65
65
|
const animationRun = () => {
|
|
66
66
|
if (this.animationRun !== animationRun)
|
|
67
67
|
return;
|