@netless/app-slide 0.0.57 → 0.0.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/app-slide",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@ import type { Attributes, MagixEvents, MagixPayload, SlideState } from "../typin
14
14
 
15
15
  import { SideEffectManager } from "side-effect-manager";
16
16
  import { Slide, SLIDE_EVENTS } from "@netless/slide";
17
- import { clamp, deepClone, isObj } from "../utils/helpers";
17
+ import { clamp, deepClone } from "../utils/helpers";
18
18
  import { cachedGetBgColor } from "../utils/bgcolor";
19
19
  import { logger, log, verbose } from "../utils/logger";
20
20
  export { syncSceneWithSlide, createDocsViewerPages } from "./helpers";
@@ -168,13 +168,11 @@ export class SlideController {
168
168
  };
169
169
 
170
170
  private magixEventListener: MagixEventListener = ev => {
171
- if (ev.event === SLIDE_EVENTS.syncDispatch && isObj(ev.payload)) {
172
- const { type, payload } = ev.payload as MagixPayload;
173
- if (type === SLIDE_EVENTS.syncDispatch) {
174
- this.syncStateOnce();
175
- log("[Slide] receive", payload);
176
- this.slide.emit(SLIDE_EVENTS.syncReceive, payload);
177
- }
171
+ const { type, payload } = ev.payload;
172
+ if (type === SLIDE_EVENTS.syncDispatch) {
173
+ this.syncStateOnce();
174
+ log("[Slide] receive", payload);
175
+ this.slide.emit(SLIDE_EVENTS.syncReceive, payload);
178
176
  }
179
177
  };
180
178