@vnejs/plugins.scenario.fastforward 0.1.15 → 0.1.16
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.
|
@@ -32,17 +32,10 @@ export class Fastforward extends ModuleCore {
|
|
|
32
32
|
onFastforwardEmitCheck = () => setTimeout(() => this.shared.isFastforwardOn && this.emit(this.EVENTS.FASTFORWARD.EMIT), this.shared.settings[this.SETTINGS.FASTFORWARD.DELAY]);
|
|
33
33
|
setValue = (value) => {
|
|
34
34
|
this.shared.isFastforwardOn = value;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.shared.viewForceAnimationSources.push(this.name);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.shared.mediaNoTimeoutSources = this.shared.mediaNoTimeoutSources.filter(this.notFastForward);
|
|
41
|
-
this.shared.viewForceAnimationSources = this.shared.viewForceAnimationSources.filter(this.notFastForward);
|
|
42
|
-
}
|
|
35
|
+
this.shared.mediaNoTimeoutSources.set(this.name, value);
|
|
36
|
+
this.shared.viewForceAnimationSources.set(this.name, value);
|
|
43
37
|
this.emit(this.EVENTS.FASTFORWARD.CHANGED, { value });
|
|
44
38
|
if (value)
|
|
45
39
|
this.emit(this.EVENTS.FASTFORWARD.EMIT);
|
|
46
40
|
};
|
|
47
|
-
notFastForward = (s) => s !== this.name;
|
|
48
41
|
}
|
package/package.json
CHANGED
|
@@ -51,18 +51,11 @@ export class Fastforward extends ModuleCore<FastforwardPluginEvents, Fastforward
|
|
|
51
51
|
setValue = (value: boolean) => {
|
|
52
52
|
this.shared.isFastforwardOn = value;
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.shared.viewForceAnimationSources.push(this.name);
|
|
57
|
-
} else {
|
|
58
|
-
this.shared.mediaNoTimeoutSources = this.shared.mediaNoTimeoutSources.filter(this.notFastForward);
|
|
59
|
-
this.shared.viewForceAnimationSources = this.shared.viewForceAnimationSources.filter(this.notFastForward);
|
|
60
|
-
}
|
|
54
|
+
this.shared.mediaNoTimeoutSources.set(this.name, value);
|
|
55
|
+
this.shared.viewForceAnimationSources.set(this.name, value);
|
|
61
56
|
|
|
62
57
|
this.emit(this.EVENTS.FASTFORWARD.CHANGED, { value } satisfies FastforwardChangedPayload);
|
|
63
58
|
|
|
64
59
|
if (value) this.emit(this.EVENTS.FASTFORWARD.EMIT);
|
|
65
60
|
};
|
|
66
|
-
|
|
67
|
-
notFastForward = (s: string) => s !== this.name;
|
|
68
61
|
}
|