@netless/forge-slide 0.1.1-alpha.8 → 0.1.1-alpha.9

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/src/Slide.ts CHANGED
@@ -1,6 +1,6 @@
1
- import EventEmitter from "eventemitter3";
2
- import { ApplicationInstanceType } from "@netless/forge-room";
3
- import { ForgeSlidePermissionFlag, ForgeSlidePermissions } from "./ForgeSlidePermession";
1
+ import EventEmitter from 'eventemitter3';
2
+ import { ApplicationInstanceType } from '@netless/forge-room';
3
+ import { ForgeSlidePermissionFlag, ForgeSlidePermissions } from './ForgeSlidePermession';
4
4
 
5
5
  export interface SlideEvents {
6
6
  /**
@@ -39,58 +39,57 @@ export interface SlideEvents {
39
39
 
40
40
  export class SlideForge extends EventEmitter<SlideEvents> implements ApplicationInstanceType {
41
41
 
42
- public readonly view!: HTMLDivElement;
43
- public readonly permissions!: ForgeSlidePermissions;
44
- public readonly footView!: HTMLDivElement;
45
- public readonly sideBarView!: HTMLDivElement;
46
- public readonly whiteboardView!: HTMLDivElement;
47
- /**
42
+ public readonly view!: HTMLDivElement;
43
+ public readonly permissions!: ForgeSlidePermissions;
44
+ public readonly footView!: HTMLDivElement;
45
+ public readonly sideBarView!: HTMLDivElement;
46
+ /**
48
47
  * 当前页面索引, 从 0 开始
49
48
  */
50
- public readonly pageIndex!: number;
51
- /**
49
+ public readonly pageIndex!: number;
50
+ /**
52
51
  * 总页数
53
52
  */
54
- public readonly pageCount!: number;
55
- /**
53
+ public readonly pageCount!: number;
54
+ /**
56
55
  * 切换到参数指定页面, index 从 0 开始
57
56
  * @param {number} index 页面索引
58
57
  */
59
- public goto!: (index: number) => void
60
- /**
58
+ public goto!: (index: number) => void;
59
+ /**
61
60
  * 下一步, 如果已经是本页的最后一步, 则切换到下一页
62
61
  */
63
- public nextStep!: () => void
64
- /**
62
+ public nextStep!: () => void;
63
+ /**
65
64
  * 上一步, 如果已经是本页的第一步, 则切换到上一页
66
65
  */
67
- public prevStep!: () => void
68
- /**
66
+ public prevStep!: () => void;
67
+ /**
69
68
  * 下一页, 如果是最后一页, 则不执行任何操作
70
69
  */
71
- public nextPage!: () => void
72
- /**
70
+ public nextPage!: () => void;
71
+ /**
73
72
  * 上一页, 如果是第一页, 则不执行任何操作
74
73
  */
75
- public prevPage!: () => void
76
- /**
74
+ public prevPage!: () => void;
75
+ /**
77
76
  * 切换侧栏显示状态
78
77
  */
79
- public sideBarToggle!: () => void
78
+ public sideBarToggle!: () => void;
80
79
 
81
- /**
80
+ /**
82
81
  * 获取预览图图片内容, base64 编码
83
82
  * @param {number} index 页面索引
84
83
  */
85
- public imgContent!: (index: number) => Promise<string>;
86
- /**
84
+ public imgContent!: (index: number) => Promise<string>;
85
+ /**
87
86
  * 获取预览图图片链接
88
87
  * @param {number} index 页面索引
89
88
  */
90
- public imgUrl!: (index: number) => Promise<string>;
91
- /**
89
+ public imgUrl!: (index: number) => Promise<string>;
90
+ /**
92
91
  * 获取预览图图片尺寸
93
92
  * @param {number} index 页面索引
94
93
  */
95
- public imgSize!: (index: number) => Promise<{width: number, height: number}>;
94
+ public imgSize!: (index: number) => Promise<{width: number, height: number}>;
96
95
  }