@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.
@@ -15,5 +15,4 @@ export declare class Fastforward extends ModuleCore<FastforwardPluginEvents, Fas
15
15
  onFastforwardEmit: () => Promise<void>;
16
16
  onFastforwardEmitCheck: () => number;
17
17
  setValue: (value: boolean) => void;
18
- notFastForward: (s: string) => boolean;
19
18
  }
@@ -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
- if (value) {
36
- this.shared.mediaNoTimeoutSources.push(this.name);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.scenario.fastforward",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- if (value) {
55
- this.shared.mediaNoTimeoutSources.push(this.name);
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
  }