@netless/app-slide 0.2.74-beta.0 → 0.2.74

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,15 +1,9 @@
1
1
  {
2
2
  "name": "@netless/app-slide",
3
- "version": "0.2.74-beta.0",
3
+ "version": "0.2.74",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
7
- "scripts": {
8
- "types": "node scripts/build-types.mjs",
9
- "build": "vite build && npm run types",
10
- "build:dev": "vite build --mode development && npm run types",
11
- "cleanup": "rimraf ./dist"
12
- },
13
7
  "files": [
14
8
  "src",
15
9
  "dist",
@@ -30,5 +24,11 @@
30
24
  "jspdf": {
31
25
  "optional": true
32
26
  }
27
+ },
28
+ "scripts": {
29
+ "types": "node scripts/build-types.mjs",
30
+ "build": "vite build && npm run types",
31
+ "build:dev": "vite build --mode development && npm run types",
32
+ "cleanup": "rimraf ./dist"
33
33
  }
34
- }
34
+ }
@@ -31,8 +31,8 @@ export function syncSceneWithSlide(
31
31
  if (!(page > 0) || !context.getIsWritable()) return;
32
32
 
33
33
  const scenePath = [baseScenePath, page].join("/");
34
- // 只有打开ppt用户,并且场景路径不是页面(未被其它用户创建出页面),则需要同步场景
35
- if (context.isAddApp && room.scenePathType(scenePath) !== ("page" as ScenePathType.Page)) {
34
+
35
+ if (room.scenePathType(scenePath) !== ("page" as ScenePathType.Page)) {
36
36
  room.removeScenes(baseScenePath);
37
37
  const count = slide.slideCount;
38
38
  const scenes: { name: string }[] = [];
@@ -47,10 +47,7 @@ export function syncSceneWithSlide(
47
47
  currentScenePath = context.getView()?.focusScenePath || "";
48
48
  }
49
49
 
50
- if (
51
- currentScenePath !== scenePath &&
52
- room.scenePathType(scenePath) === ("page" as ScenePathType.Page)
53
- ) {
50
+ if (currentScenePath !== scenePath) {
54
51
  context.setScenePath(scenePath);
55
52
  }
56
53
  }