@netless/forge-slide 0.1.0-alpha.0 → 0.1.1-alpha.0
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/dist/Slide.d.ts +35 -6
- package/dist/Slide.d.ts.map +1 -1
- package/dist/SlideApplication.d.ts +6 -0
- package/dist/SlideApplication.d.ts.map +1 -1
- package/dist/index.esm.js +116 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +116 -3
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/Slide.ts +35 -6
- package/src/SlideApplication.ts +119 -6
package/dist/Slide.d.ts
CHANGED
|
@@ -19,10 +19,21 @@ export interface SlideEvents {
|
|
|
19
19
|
* @param {number} pageIndex 页面索引
|
|
20
20
|
*/
|
|
21
21
|
renderEnd: (pageIndex: number) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 主序列动画完成时触发
|
|
24
|
+
* @param {number} animateIndex 主动画索引
|
|
25
|
+
*/
|
|
26
|
+
mainSeqStepEnd: (animateIndex: number) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 主序列动画开始时触发
|
|
29
|
+
* @param {number} animateIndex 主动画索引
|
|
30
|
+
*/
|
|
31
|
+
mainSeqStepStart: (animateIndex: number) => void;
|
|
22
32
|
}
|
|
23
33
|
export declare class SlideForge extends EventEmitter<SlideEvents> implements ApplicationInstanceType {
|
|
24
34
|
readonly view: HTMLDivElement;
|
|
25
35
|
readonly permissions: ForgeSlidePermissions;
|
|
36
|
+
readonly footView: HTMLDivElement;
|
|
26
37
|
/**
|
|
27
38
|
* 当前页面索引, 从 0 开始
|
|
28
39
|
*/
|
|
@@ -35,26 +46,44 @@ export declare class SlideForge extends EventEmitter<SlideEvents> implements App
|
|
|
35
46
|
* 切换到参数指定页面, index 从 0 开始
|
|
36
47
|
* @param {number} index 页面索引
|
|
37
48
|
*/
|
|
38
|
-
goto: (index: number) =>
|
|
49
|
+
goto: (index: number) => void;
|
|
39
50
|
/**
|
|
40
51
|
* 下一步, 如果已经是本页的最后一步, 则切换到下一页
|
|
41
52
|
*/
|
|
42
|
-
nextStep: () =>
|
|
53
|
+
nextStep: () => void;
|
|
43
54
|
/**
|
|
44
55
|
* 上一步, 如果已经是本页的第一步, 则切换到上一页
|
|
45
56
|
*/
|
|
46
|
-
prevStep: () =>
|
|
57
|
+
prevStep: () => void;
|
|
47
58
|
/**
|
|
48
59
|
* 下一页, 如果是最后一页, 则不执行任何操作
|
|
49
60
|
*/
|
|
50
|
-
nextPage: () =>
|
|
61
|
+
nextPage: () => void;
|
|
51
62
|
/**
|
|
52
63
|
* 上一页, 如果是第一页, 则不执行任何操作
|
|
53
64
|
*/
|
|
54
|
-
prevPage: () =>
|
|
65
|
+
prevPage: () => void;
|
|
55
66
|
/**
|
|
56
67
|
* 切换侧栏显示状态
|
|
57
68
|
*/
|
|
58
|
-
sideBarToggle: () =>
|
|
69
|
+
sideBarToggle: () => void;
|
|
70
|
+
/**
|
|
71
|
+
* 获取预览图图片内容, base64 编码
|
|
72
|
+
* @param {number} index 页面索引
|
|
73
|
+
*/
|
|
74
|
+
imgContent: (index: number) => Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* 获取预览图图片链接
|
|
77
|
+
* @param {number} index 页面索引
|
|
78
|
+
*/
|
|
79
|
+
imgUrl: (index: number) => Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* 获取预览图图片尺寸
|
|
82
|
+
* @param {number} index 页面索引
|
|
83
|
+
*/
|
|
84
|
+
imgSize: (index: number) => Promise<{
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
}>;
|
|
59
88
|
}
|
|
60
89
|
//# sourceMappingURL=Slide.d.ts.map
|
package/dist/Slide.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide.d.ts","sourceRoot":"","sources":["../src/Slide.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,WAAW,WAAW;IACxB;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7F;;;OAGG;IACH,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Slide.d.ts","sourceRoot":"","sources":["../src/Slide.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,WAAW,WAAW;IACxB;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7F;;;OAGG;IACH,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C;;;OAGG;IACH,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAGD,qBAAa,UAAW,SAAQ,YAAY,CAAC,WAAW,CAAE,YAAW,uBAAuB;IAExF,SAAgB,IAAI,EAAG,cAAc,CAAC;IACtC,SAAgB,WAAW,EAAG,qBAAqB,CAAC;IACpD,SAAgB,QAAQ,EAAG,cAAc,CAAC;IAC1C;;OAEG;IACH,SAAgB,SAAS,EAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAgB,SAAS,EAAG,MAAM,CAAC;IACnC;;;OAGG;IACI,IAAI,EAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC;;OAEG;IACI,QAAQ,EAAG,MAAM,IAAI,CAAA;IAC5B;;OAEG;IACI,QAAQ,EAAG,MAAM,IAAI,CAAA;IAC5B;;OAEG;IACI,QAAQ,EAAG,MAAM,IAAI,CAAA;IAC5B;;OAEG;IACI,QAAQ,EAAG,MAAM,IAAI,CAAA;IAC5B;;OAEG;IACI,aAAa,EAAG,MAAM,IAAI,CAAA;IAEjC;;;OAGG;IACI,UAAU,EAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD;;;OAGG;IACI,MAAM,EAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD;;;OAGG;IACI,OAAO,EAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAChF"}
|
|
@@ -26,7 +26,13 @@ export declare class SlideApplication extends AbstractApplication<SlideApplicati
|
|
|
26
26
|
private sideBar;
|
|
27
27
|
private slide;
|
|
28
28
|
private currentSlideIndex;
|
|
29
|
+
private taskId;
|
|
30
|
+
private prefix;
|
|
29
31
|
constructor();
|
|
32
|
+
private getPreviewImage;
|
|
33
|
+
private getImageUrl;
|
|
34
|
+
private getImageSize;
|
|
35
|
+
private getImageContent;
|
|
30
36
|
private applySlideState;
|
|
31
37
|
private onSlideEventHandler;
|
|
32
38
|
initialize(option: SlideApplicationOption): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideApplication.d.ts","sourceRoot":"","sources":["../src/SlideApplication.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SlideApplication.d.ts","sourceRoot":"","sources":["../src/SlideApplication.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAQnC,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AASD,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAE5C,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,sBAAsB,EAAE,UAAU,CAAC;IAEzF,MAAM,CAAC,eAAe,SAAkB;IAExC,SAAgB,IAAI,EAAE,MAAM,CAAkB;IAC9C,SAAgB,OAAO,EAAE,UAAU,CAAoB;IAEvD,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,QAAQ,CAAiD;IACjE,OAAO,CAAC,gBAAgB,CAAiD;IACzE,OAAO,CAAC,mBAAmB,CAAiD;IAC5E,OAAO,CAAC,cAAc,CAAiD;IACvE,OAAO,CAAC,WAAW,CAAyB;IAC5C,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,MAAM,CAAc;;YAsLd,eAAe;YAuBf,WAAW;YAIX,YAAY;YAiBZ,eAAe;IAiB7B,OAAO,CAAC,eAAe,CAYtB;IAED,OAAO,CAAC,mBAAmB,CAS1B;IAEY,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmItE,OAAO,CAAC,OAAO;IAIF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CASxC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -66585,6 +66585,7 @@ import EventEmitter14 from "eventemitter3";
|
|
|
66585
66585
|
var SlideForge = class extends EventEmitter14 {
|
|
66586
66586
|
view;
|
|
66587
66587
|
permissions;
|
|
66588
|
+
footView;
|
|
66588
66589
|
/**
|
|
66589
66590
|
* 当前页面索引, 从 0 开始
|
|
66590
66591
|
*/
|
|
@@ -66618,6 +66619,21 @@ var SlideForge = class extends EventEmitter14 {
|
|
|
66618
66619
|
* 切换侧栏显示状态
|
|
66619
66620
|
*/
|
|
66620
66621
|
sideBarToggle;
|
|
66622
|
+
/**
|
|
66623
|
+
* 获取预览图图片内容, base64 编码
|
|
66624
|
+
* @param {number} index 页面索引
|
|
66625
|
+
*/
|
|
66626
|
+
imgContent;
|
|
66627
|
+
/**
|
|
66628
|
+
* 获取预览图图片链接
|
|
66629
|
+
* @param {number} index 页面索引
|
|
66630
|
+
*/
|
|
66631
|
+
imgUrl;
|
|
66632
|
+
/**
|
|
66633
|
+
* 获取预览图图片尺寸
|
|
66634
|
+
* @param {number} index 页面索引
|
|
66635
|
+
*/
|
|
66636
|
+
imgSize;
|
|
66621
66637
|
};
|
|
66622
66638
|
|
|
66623
66639
|
// src/ForgeSlidePermession.ts
|
|
@@ -66961,6 +66977,7 @@ async function delay2(time) {
|
|
|
66961
66977
|
}
|
|
66962
66978
|
|
|
66963
66979
|
// src/SlideApplication.ts
|
|
66980
|
+
import { kvStore } from "@netless/forge-room";
|
|
66964
66981
|
var Slide_APP_NAME = "forge_slide";
|
|
66965
66982
|
var SlideApplication = class extends AbstractApplication2 {
|
|
66966
66983
|
static applicationName = Slide_APP_NAME;
|
|
@@ -66977,6 +66994,8 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
66977
66994
|
sideBar;
|
|
66978
66995
|
slide;
|
|
66979
66996
|
currentSlideIndex = 0;
|
|
66997
|
+
taskId = "";
|
|
66998
|
+
prefix = "";
|
|
66980
66999
|
constructor() {
|
|
66981
67000
|
super();
|
|
66982
67001
|
window.emitter = this.emitter;
|
|
@@ -67049,6 +67068,9 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67049
67068
|
}
|
|
67050
67069
|
});
|
|
67051
67070
|
this.rootView.appendChild(this.contentContainer);
|
|
67071
|
+
this.permissions.on("change", (userId, flags, value) => {
|
|
67072
|
+
this.emitter.emit("permissionChange", userId, flags, value);
|
|
67073
|
+
});
|
|
67052
67074
|
this.emitter.on("renderStart", (pageIndex) => {
|
|
67053
67075
|
this.footer.prevPageState(pageIndex !== 0);
|
|
67054
67076
|
});
|
|
@@ -67063,6 +67085,11 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67063
67085
|
return that.permissions;
|
|
67064
67086
|
}
|
|
67065
67087
|
});
|
|
67088
|
+
Object.defineProperty(this.emitter, "footView", {
|
|
67089
|
+
get() {
|
|
67090
|
+
return that.footer.root;
|
|
67091
|
+
}
|
|
67092
|
+
});
|
|
67066
67093
|
Object.defineProperty(this.emitter, "pageIndex", {
|
|
67067
67094
|
get() {
|
|
67068
67095
|
return that.currentSlideIndex;
|
|
@@ -67115,13 +67142,90 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67115
67142
|
this.footer.emit("sideBarToggle");
|
|
67116
67143
|
}
|
|
67117
67144
|
});
|
|
67145
|
+
Object.defineProperty(this.emitter, "imgContent", {
|
|
67146
|
+
writable: false,
|
|
67147
|
+
enumerable: false,
|
|
67148
|
+
value: (pageIndex) => {
|
|
67149
|
+
return this.getImageContent(pageIndex);
|
|
67150
|
+
}
|
|
67151
|
+
});
|
|
67152
|
+
Object.defineProperty(this.emitter, "imgUrl", {
|
|
67153
|
+
writable: false,
|
|
67154
|
+
enumerable: false,
|
|
67155
|
+
value: (pageIndex) => {
|
|
67156
|
+
return this.getImageUrl(pageIndex);
|
|
67157
|
+
}
|
|
67158
|
+
});
|
|
67159
|
+
Object.defineProperty(this.emitter, "imgSize", {
|
|
67160
|
+
writable: false,
|
|
67161
|
+
enumerable: false,
|
|
67162
|
+
value: (pageIndex) => {
|
|
67163
|
+
return this.getImageSize(pageIndex);
|
|
67164
|
+
}
|
|
67165
|
+
});
|
|
67166
|
+
}
|
|
67167
|
+
async getPreviewImage(imageUrl) {
|
|
67168
|
+
const image = fetch(imageUrl);
|
|
67169
|
+
return await image.then((res) => res.blob()).then((blob) => {
|
|
67170
|
+
return new Promise((resolve) => {
|
|
67171
|
+
const reader = new FileReader();
|
|
67172
|
+
reader.onloadend = () => {
|
|
67173
|
+
const base64Data = reader.result;
|
|
67174
|
+
const img = document.createElement("img");
|
|
67175
|
+
img.src = base64Data;
|
|
67176
|
+
img.onload = () => {
|
|
67177
|
+
resolve({
|
|
67178
|
+
url: imageUrl,
|
|
67179
|
+
src: base64Data,
|
|
67180
|
+
width: img.width,
|
|
67181
|
+
height: img.height
|
|
67182
|
+
});
|
|
67183
|
+
};
|
|
67184
|
+
};
|
|
67185
|
+
reader.readAsDataURL(blob);
|
|
67186
|
+
});
|
|
67187
|
+
});
|
|
67188
|
+
}
|
|
67189
|
+
async getImageUrl(pageIndex) {
|
|
67190
|
+
return `${this.prefix}/${this.taskId}/preview/${pageIndex + 1}.png`;
|
|
67191
|
+
}
|
|
67192
|
+
async getImageSize(pageIndex) {
|
|
67193
|
+
const imageUrl = `${this.prefix}/${this.taskId}/preview/${pageIndex + 1}.png`;
|
|
67194
|
+
let preview = null;
|
|
67195
|
+
try {
|
|
67196
|
+
const result = await kvStore.getItem(imageUrl);
|
|
67197
|
+
preview = result ? JSON.parse(result) : null;
|
|
67198
|
+
} catch (e) {
|
|
67199
|
+
console.warn("kvStore getItem error", e);
|
|
67200
|
+
}
|
|
67201
|
+
if (preview) {
|
|
67202
|
+
return { width: preview.width, height: preview.height };
|
|
67203
|
+
}
|
|
67204
|
+
preview = await this.getPreviewImage(imageUrl);
|
|
67205
|
+
await kvStore.setItem(imageUrl, JSON.stringify(preview));
|
|
67206
|
+
return { width: preview.width, height: preview.height };
|
|
67207
|
+
}
|
|
67208
|
+
async getImageContent(pageIndex) {
|
|
67209
|
+
const imageUrl = `${this.prefix}/${this.taskId}/preview/${pageIndex + 1}.png`;
|
|
67210
|
+
let preview = null;
|
|
67211
|
+
try {
|
|
67212
|
+
const result = await kvStore.getItem(imageUrl);
|
|
67213
|
+
preview = result ? JSON.parse(result) : null;
|
|
67214
|
+
} catch (e) {
|
|
67215
|
+
console.warn("kvStore getItem error", e);
|
|
67216
|
+
}
|
|
67217
|
+
if (preview) {
|
|
67218
|
+
return preview.src;
|
|
67219
|
+
}
|
|
67220
|
+
preview = await this.getPreviewImage(imageUrl);
|
|
67221
|
+
await kvStore.setItem(imageUrl, JSON.stringify(preview));
|
|
67222
|
+
return preview.src;
|
|
67118
67223
|
}
|
|
67119
67224
|
applySlideState = async (slideState, lastDispatch) => {
|
|
67120
67225
|
if (this.slide.slideState.currentSlideIndex < 0) {
|
|
67121
67226
|
this.slide.emit(import_slide.SLIDE_EVENTS.syncReceive, lastDispatch);
|
|
67122
67227
|
return;
|
|
67123
67228
|
}
|
|
67124
|
-
console.log("%cisEqual", "color: blue; font-size: 20px;", deepEqual(this.slide.slideState, slideState));
|
|
67125
67229
|
if (this.slide.slideState.currentSlideIndex > 0 && deepEqual(this.slide.slideState, slideState)) {
|
|
67126
67230
|
this.slide.emit(import_slide.SLIDE_EVENTS.syncReceive, lastDispatch);
|
|
67127
67231
|
} else {
|
|
@@ -67141,6 +67245,8 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67141
67245
|
}
|
|
67142
67246
|
};
|
|
67143
67247
|
async initialize(option) {
|
|
67248
|
+
this.prefix = option.prefix;
|
|
67249
|
+
this.taskId = option.taskId;
|
|
67144
67250
|
const whiteboardApp = new WhiteboardApplication();
|
|
67145
67251
|
whiteboardApp.roomDoc = this.roomDoc;
|
|
67146
67252
|
whiteboardApp.appId = `${option.taskId}_wb`;
|
|
@@ -67174,7 +67280,6 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67174
67280
|
this.contentContainer.appendChild(this.sideBar.root);
|
|
67175
67281
|
if (option.inheritWhiteboardId) {
|
|
67176
67282
|
whiteboardApp.linkToWhiteboard(option.inheritWhiteboardId);
|
|
67177
|
-
console.log("inheritWhiteboardId", option.inheritWhiteboardId);
|
|
67178
67283
|
}
|
|
67179
67284
|
this.whiteboard.setViewModeToMain();
|
|
67180
67285
|
this.slideContainer.setAttribute("builder", "slide-builder");
|
|
@@ -67197,14 +67302,22 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67197
67302
|
dispatch: event
|
|
67198
67303
|
});
|
|
67199
67304
|
});
|
|
67305
|
+
this.slide.on("mainSeqStepStart", (animateIndex) => {
|
|
67306
|
+
this.emitter.emit("mainSeqStepStart", animateIndex);
|
|
67307
|
+
});
|
|
67308
|
+
this.slide.on("mainSeqStepEnd", (animateIndex) => {
|
|
67309
|
+
this.emitter.emit("mainSeqStepEnd", animateIndex);
|
|
67310
|
+
});
|
|
67200
67311
|
this.slide.on("renderStart", (slideIndex) => {
|
|
67201
67312
|
this.whiteboardApp.emitter.view.style.opacity = "0";
|
|
67202
67313
|
this.whiteboardApp.emitter.addPage(`${slideIndex}`);
|
|
67203
67314
|
this.whiteboardApp.emitter.gotoPage(`${slideIndex}`);
|
|
67315
|
+
this.emitter.emit("renderStart", slideIndex);
|
|
67204
67316
|
});
|
|
67205
67317
|
this.slide.on("renderEnd", (slideIndex) => {
|
|
67206
67318
|
this.currentSlideIndex = slideIndex;
|
|
67207
67319
|
this.whiteboardApp.emitter.view.style.opacity = "1";
|
|
67320
|
+
this.emitter.emit("renderEnd", slideIndex);
|
|
67208
67321
|
});
|
|
67209
67322
|
this.slide.on("stateChange", (state) => {
|
|
67210
67323
|
this.getMap(this.name).set("slideState", state);
|
|
@@ -67212,6 +67325,7 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67212
67325
|
this.getMap(this.name).observe(this.onSlideEventHandler);
|
|
67213
67326
|
window.slide = this.slide;
|
|
67214
67327
|
window.slideWhiteboard = this.whiteboardApp;
|
|
67328
|
+
window.forgeSlide = this;
|
|
67215
67329
|
const syncSlide = this.getMap(this.name).get("slideState");
|
|
67216
67330
|
if (syncSlide && syncSlide.taskId === option.taskId) {
|
|
67217
67331
|
await this.slide.setSlideState(syncSlide);
|
|
@@ -67222,7 +67336,6 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67222
67336
|
return this.userMap(userId);
|
|
67223
67337
|
});
|
|
67224
67338
|
this.permissions.on("change", (userId, flags, value) => {
|
|
67225
|
-
console.log(userId, flags, value);
|
|
67226
67339
|
if (this.userId === userId) {
|
|
67227
67340
|
if (flags.includes(4 /* clickAnim */)) {
|
|
67228
67341
|
this.slideContainer.style.pointerEvents = "auto";
|