@netless/app-slide 0.0.25 → 0.0.26

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.25",
3
+ "version": "0.0.26",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "devDependencies": {
13
13
  "@netless/app-shared": "^0.1.1",
14
- "@netless/slide": "^0.1.30",
14
+ "@netless/slide": "^0.1.32",
15
15
  "side-effect-manager": "^0.1.5",
16
16
  "vanilla-lazyload": "^17.5.0"
17
17
  },
@@ -96,6 +96,7 @@ export class SlideController {
96
96
  if (this.debug) {
97
97
  console.log("[Slide] init with state", deepClone(state));
98
98
  }
99
+ this.syncStateOnceFlag = false;
99
100
  slide.setSlideState(deepClone(state));
100
101
  } else if (context.isAddApp) {
101
102
  // otherwise, maybe this slide is just added, let the adder kick start first render
@@ -195,6 +196,9 @@ export class SlideController {
195
196
 
196
197
  private onStateChange = (state: SlideState) => {
197
198
  if (this.context.getIsWritable()) {
199
+ if (import.meta.env.DEV) {
200
+ console.log("[Slide] state change", JSON.stringify(state, null, 2));
201
+ }
198
202
  this.context.updateAttributes(["state"], state);
199
203
  }
200
204
  };
@@ -245,7 +249,7 @@ export class SlideController {
245
249
  autoFPS: true,
246
250
  autoResolution: true,
247
251
  resolution: this.context.getAppOptions()?.resolution,
248
- transactionBgColor: "#f9f9fc",
252
+ transactionBgColor: this.context.getAppOptions()?.bgColor || "#f9f9fc",
249
253
  },
250
254
  timestamp: this.timestamp,
251
255
  });