@netless/forge-slide 0.1.1-alpha.7 → 0.1.1-alpha.8
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/SiderBarView.d.ts +4 -0
- package/dist/SiderBarView.d.ts.map +1 -1
- package/dist/Slide.d.ts +1 -0
- package/dist/Slide.d.ts.map +1 -1
- package/dist/SlideApplication.d.ts +3 -0
- package/dist/SlideApplication.d.ts.map +1 -1
- package/dist/index.esm.js +175 -105
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +175 -105
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/SiderBarView.ts +24 -3
- package/src/Slide.ts +1 -0
- package/src/SlideApplication.ts +141 -106
package/dist/SiderBarView.d.ts
CHANGED
|
@@ -5,12 +5,16 @@ interface SideBarViewEvents {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class SideBarView extends EventEmitter<SideBarViewEvents> {
|
|
7
7
|
readonly root: HTMLDivElement;
|
|
8
|
+
private isShow;
|
|
8
9
|
private itemList;
|
|
9
10
|
constructor();
|
|
11
|
+
get isShowSideBar(): boolean;
|
|
10
12
|
private onMouseOver;
|
|
11
13
|
private onMouseOut;
|
|
12
14
|
private onClickHandle;
|
|
13
15
|
initialize(slideCount: number, option: SlideApplicationOption): void;
|
|
16
|
+
hidden(): void;
|
|
17
|
+
show(): void;
|
|
14
18
|
dispose(): void;
|
|
15
19
|
}
|
|
16
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiderBarView.d.ts","sourceRoot":"","sources":["../src/SiderBarView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAC1D,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,UAAU,iBAAiB;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,qBAAa,WAAY,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC5D,SAAgB,IAAI,EAAE,cAAc,CAAiC;IACrE,OAAO,CAAC,QAAQ,CAAwB;;
|
|
1
|
+
{"version":3,"file":"SiderBarView.d.ts","sourceRoot":"","sources":["../src/SiderBarView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAC1D,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,UAAU,iBAAiB;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,qBAAa,WAAY,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC5D,SAAgB,IAAI,EAAE,cAAc,CAAiC;IACrE,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,QAAQ,CAAwB;;IAoBxC,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,OAAO,CAAC,WAAW,CAElB;IAED,OAAO,CAAC,UAAU,CAEjB;IAED,OAAO,CAAC,aAAa,CAEpB;IAEM,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,GAAG,IAAI;IAsCpE,MAAM;IAUN,IAAI;IAUJ,OAAO;CAOjB"}
|
package/dist/Slide.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare class SlideForge extends EventEmitter<SlideEvents> implements App
|
|
|
35
35
|
readonly permissions: ForgeSlidePermissions;
|
|
36
36
|
readonly footView: HTMLDivElement;
|
|
37
37
|
readonly sideBarView: HTMLDivElement;
|
|
38
|
+
readonly whiteboardView: HTMLDivElement;
|
|
38
39
|
/**
|
|
39
40
|
* 当前页面索引, 从 0 开始
|
|
40
41
|
*/
|
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,uBA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Ac,CAAC;IAC7C,SAAgB,cAAc,EAAG,cAAc,CAAC;IAChD;;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"}
|
|
@@ -37,6 +37,9 @@ export declare class SlideApplication extends AbstractApplication<SlideApplicati
|
|
|
37
37
|
private getImageContent;
|
|
38
38
|
private applySlideState;
|
|
39
39
|
private onSlideEventHandler;
|
|
40
|
+
private keyBoardEvents;
|
|
41
|
+
private bindKeyBoardEvent;
|
|
42
|
+
private unbindKeyBoarEvent;
|
|
40
43
|
initialize(option: SlideApplicationOption): Promise<void>;
|
|
41
44
|
private userMap;
|
|
42
45
|
dispose(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideApplication.d.ts","sourceRoot":"","sources":["../src/SlideApplication.ts"],"names":[],"mappings":"AACA,OAAO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HANGED
|
@@ -66587,6 +66587,7 @@ var SlideForge = class extends EventEmitter14 {
|
|
|
66587
66587
|
permissions;
|
|
66588
66588
|
footView;
|
|
66589
66589
|
sideBarView;
|
|
66590
|
+
whiteboardView;
|
|
66590
66591
|
/**
|
|
66591
66592
|
* 当前页面索引, 从 0 开始
|
|
66592
66593
|
*/
|
|
@@ -66870,6 +66871,7 @@ var FooterView = class extends EventEmitter16 {
|
|
|
66870
66871
|
import EventEmitter17 from "eventemitter3";
|
|
66871
66872
|
var SideBarView = class extends EventEmitter17 {
|
|
66872
66873
|
root = document.createElement("div");
|
|
66874
|
+
isShow = false;
|
|
66873
66875
|
itemList = [];
|
|
66874
66876
|
constructor() {
|
|
66875
66877
|
super();
|
|
@@ -66883,13 +66885,14 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66883
66885
|
this.root.style.zIndex = "5";
|
|
66884
66886
|
this.root.style.transition = "left 0.3s ease-in-out";
|
|
66885
66887
|
this.root.style.overflow = "auto";
|
|
66886
|
-
this.root.style.border = "1px solid #ccc";
|
|
66887
|
-
this.root.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.1)";
|
|
66888
66888
|
this.root.style.display = "flex";
|
|
66889
66889
|
this.root.style.flexDirection = "column";
|
|
66890
66890
|
this.root.style.justifyContent = "flex-start";
|
|
66891
66891
|
this.root.style.alignItems = "center";
|
|
66892
66892
|
}
|
|
66893
|
+
get isShowSideBar() {
|
|
66894
|
+
return this.isShow;
|
|
66895
|
+
}
|
|
66893
66896
|
onMouseOver = (itemContainer) => {
|
|
66894
66897
|
itemContainer.style.borderColor = "#ccc";
|
|
66895
66898
|
};
|
|
@@ -66907,7 +66910,6 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66907
66910
|
itemContainer.style.display = "flex";
|
|
66908
66911
|
itemContainer.style.justifyContent = "center";
|
|
66909
66912
|
itemContainer.style.alignItems = "flex-start";
|
|
66910
|
-
itemContainer.style.border = "7px solid transparent";
|
|
66911
66913
|
itemContainer.style.position = "relative";
|
|
66912
66914
|
itemContainer.style.borderRadius = "4px";
|
|
66913
66915
|
itemContainer.style.transition = "border-color .3s";
|
|
@@ -66932,6 +66934,24 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66932
66934
|
this.root.appendChild(itemContainer);
|
|
66933
66935
|
}
|
|
66934
66936
|
}
|
|
66937
|
+
hidden() {
|
|
66938
|
+
if (!this.root) {
|
|
66939
|
+
return;
|
|
66940
|
+
}
|
|
66941
|
+
this.root.style.left = "-240px";
|
|
66942
|
+
this.root.style.border = "none";
|
|
66943
|
+
this.root.style.boxShadow = "none";
|
|
66944
|
+
this.isShow = false;
|
|
66945
|
+
}
|
|
66946
|
+
show() {
|
|
66947
|
+
if (!this.root) {
|
|
66948
|
+
return;
|
|
66949
|
+
}
|
|
66950
|
+
this.root.style.left = "0";
|
|
66951
|
+
this.root.style.border = "1px solid #ccc";
|
|
66952
|
+
this.root.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.1)";
|
|
66953
|
+
this.isShow = true;
|
|
66954
|
+
}
|
|
66935
66955
|
dispose() {
|
|
66936
66956
|
this.itemList.forEach((item) => {
|
|
66937
66957
|
item.removeEventListener("mouseover", () => this.onMouseOver(item));
|
|
@@ -67064,108 +67084,116 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67064
67084
|
if (!this.permissions.hasPermission(2 /* changePage */)) {
|
|
67065
67085
|
return;
|
|
67066
67086
|
}
|
|
67067
|
-
if (this.sideBar.
|
|
67068
|
-
this.sideBar.
|
|
67087
|
+
if (this.sideBar.isShowSideBar) {
|
|
67088
|
+
this.sideBar.hidden();
|
|
67069
67089
|
} else {
|
|
67070
|
-
this.sideBar.
|
|
67090
|
+
this.sideBar.show();
|
|
67071
67091
|
}
|
|
67072
67092
|
});
|
|
67073
67093
|
this.rootView.appendChild(this.contentContainer);
|
|
67074
67094
|
this.emitter.on("renderStart", (pageIndex) => {
|
|
67075
67095
|
this.footer.prevPageState(pageIndex !== 0);
|
|
67076
67096
|
});
|
|
67077
|
-
const
|
|
67078
|
-
|
|
67079
|
-
get() {
|
|
67080
|
-
return that.rootView;
|
|
67081
|
-
}
|
|
67082
|
-
});
|
|
67083
|
-
Object.defineProperty(this.emitter, "permissions", {
|
|
67084
|
-
get() {
|
|
67085
|
-
return that.permissions;
|
|
67086
|
-
}
|
|
67087
|
-
});
|
|
67088
|
-
Object.defineProperty(this.emitter, "footView", {
|
|
67089
|
-
get() {
|
|
67090
|
-
return that.footer.root;
|
|
67091
|
-
}
|
|
67092
|
-
});
|
|
67093
|
-
Object.defineProperty(this.emitter, "sidebarView", {
|
|
67094
|
-
get() {
|
|
67095
|
-
return that.sideBar.root;
|
|
67096
|
-
}
|
|
67097
|
-
});
|
|
67098
|
-
Object.defineProperty(this.emitter, "pageIndex", {
|
|
67099
|
-
get() {
|
|
67100
|
-
return that.currentSlideIndex;
|
|
67101
|
-
}
|
|
67102
|
-
});
|
|
67103
|
-
Object.defineProperty(this.emitter, "pageCount", {
|
|
67104
|
-
get() {
|
|
67105
|
-
return that.slideCount;
|
|
67106
|
-
}
|
|
67107
|
-
});
|
|
67108
|
-
Object.defineProperty(this.emitter, "goto", {
|
|
67109
|
-
writable: false,
|
|
67110
|
-
enumerable: false,
|
|
67111
|
-
value: (pageIndex) => {
|
|
67112
|
-
this.sideBar.emit("pageChange", pageIndex);
|
|
67113
|
-
}
|
|
67114
|
-
});
|
|
67115
|
-
Object.defineProperty(this.emitter, "nextStep", {
|
|
67116
|
-
writable: false,
|
|
67117
|
-
enumerable: false,
|
|
67118
|
-
value: () => {
|
|
67119
|
-
this.footer.emit("nextStep");
|
|
67120
|
-
}
|
|
67121
|
-
});
|
|
67122
|
-
Object.defineProperty(this.emitter, "prevStep", {
|
|
67123
|
-
writable: false,
|
|
67124
|
-
enumerable: false,
|
|
67125
|
-
value: () => {
|
|
67126
|
-
this.footer.emit("prevStep");
|
|
67127
|
-
}
|
|
67128
|
-
});
|
|
67129
|
-
Object.defineProperty(this.emitter, "nextPage", {
|
|
67130
|
-
writable: false,
|
|
67131
|
-
enumerable: false,
|
|
67132
|
-
value: () => {
|
|
67133
|
-
this.footer.emit("nextPage");
|
|
67134
|
-
}
|
|
67135
|
-
});
|
|
67136
|
-
Object.defineProperty(this.emitter, "prevPage", {
|
|
67137
|
-
writable: false,
|
|
67138
|
-
enumerable: false,
|
|
67139
|
-
value: () => {
|
|
67140
|
-
this.footer.emit("prevPage");
|
|
67141
|
-
}
|
|
67142
|
-
});
|
|
67143
|
-
Object.defineProperty(this.emitter, "sideBarToggle", {
|
|
67144
|
-
writable: false,
|
|
67145
|
-
enumerable: false,
|
|
67146
|
-
value: () => {
|
|
67147
|
-
this.footer.emit("sideBarToggle");
|
|
67148
|
-
}
|
|
67149
|
-
});
|
|
67150
|
-
Object.defineProperty(this.emitter, "imgContent", {
|
|
67151
|
-
writable: false,
|
|
67152
|
-
enumerable: false,
|
|
67153
|
-
value: (pageIndex) => {
|
|
67154
|
-
return this.getImageContent(pageIndex);
|
|
67155
|
-
}
|
|
67156
|
-
});
|
|
67157
|
-
Object.defineProperty(this.emitter, "imgUrl", {
|
|
67158
|
-
writable: false,
|
|
67159
|
-
enumerable: false,
|
|
67160
|
-
value: (pageIndex) => {
|
|
67161
|
-
return this.getImageUrl(pageIndex);
|
|
67162
|
-
}
|
|
67163
|
-
});
|
|
67164
|
-
Object.defineProperty(this.emitter, "imgSize", {
|
|
67165
|
-
writable: false,
|
|
67097
|
+
const propertyConfig = {
|
|
67098
|
+
configurable: false,
|
|
67166
67099
|
enumerable: false,
|
|
67167
|
-
|
|
67168
|
-
|
|
67100
|
+
writable: false
|
|
67101
|
+
};
|
|
67102
|
+
const that = this;
|
|
67103
|
+
Object.defineProperties(this.emitter, {
|
|
67104
|
+
view: {
|
|
67105
|
+
get() {
|
|
67106
|
+
return that.rootView;
|
|
67107
|
+
}
|
|
67108
|
+
},
|
|
67109
|
+
permissions: {
|
|
67110
|
+
get() {
|
|
67111
|
+
return that.permissions;
|
|
67112
|
+
}
|
|
67113
|
+
},
|
|
67114
|
+
footView: {
|
|
67115
|
+
get() {
|
|
67116
|
+
return that.footer.root;
|
|
67117
|
+
}
|
|
67118
|
+
},
|
|
67119
|
+
sidebarView: {
|
|
67120
|
+
get() {
|
|
67121
|
+
return that.sideBar.root;
|
|
67122
|
+
}
|
|
67123
|
+
},
|
|
67124
|
+
whiteboardView: {
|
|
67125
|
+
get() {
|
|
67126
|
+
return that.whiteboard.view;
|
|
67127
|
+
}
|
|
67128
|
+
},
|
|
67129
|
+
slideView: {
|
|
67130
|
+
get() {
|
|
67131
|
+
return that.slideContainer;
|
|
67132
|
+
}
|
|
67133
|
+
},
|
|
67134
|
+
pageIndex: {
|
|
67135
|
+
get() {
|
|
67136
|
+
return that.currentSlideIndex;
|
|
67137
|
+
}
|
|
67138
|
+
},
|
|
67139
|
+
pageCount: {
|
|
67140
|
+
get() {
|
|
67141
|
+
return that.slideCount;
|
|
67142
|
+
}
|
|
67143
|
+
},
|
|
67144
|
+
goto: {
|
|
67145
|
+
...propertyConfig,
|
|
67146
|
+
value: (pageIndex) => {
|
|
67147
|
+
this.sideBar.emit("pageChange", pageIndex);
|
|
67148
|
+
}
|
|
67149
|
+
},
|
|
67150
|
+
nextStep: {
|
|
67151
|
+
...propertyConfig,
|
|
67152
|
+
value: () => {
|
|
67153
|
+
this.footer.emit("nextStep");
|
|
67154
|
+
}
|
|
67155
|
+
},
|
|
67156
|
+
prevStep: {
|
|
67157
|
+
...propertyConfig,
|
|
67158
|
+
value: () => {
|
|
67159
|
+
this.footer.emit("prevStep");
|
|
67160
|
+
}
|
|
67161
|
+
},
|
|
67162
|
+
nextPage: {
|
|
67163
|
+
...propertyConfig,
|
|
67164
|
+
value: () => {
|
|
67165
|
+
this.footer.emit("nextPage");
|
|
67166
|
+
}
|
|
67167
|
+
},
|
|
67168
|
+
prevPage: {
|
|
67169
|
+
...propertyConfig,
|
|
67170
|
+
value: () => {
|
|
67171
|
+
this.footer.emit("prevPage");
|
|
67172
|
+
}
|
|
67173
|
+
},
|
|
67174
|
+
sideBarToggle: {
|
|
67175
|
+
...propertyConfig,
|
|
67176
|
+
value: () => {
|
|
67177
|
+
this.footer.emit("sideBarToggle");
|
|
67178
|
+
}
|
|
67179
|
+
},
|
|
67180
|
+
imgContent: {
|
|
67181
|
+
...propertyConfig,
|
|
67182
|
+
value: (pageIndex) => {
|
|
67183
|
+
return this.getImageContent(pageIndex);
|
|
67184
|
+
}
|
|
67185
|
+
},
|
|
67186
|
+
imgUrl: {
|
|
67187
|
+
...propertyConfig,
|
|
67188
|
+
value: (pageIndex) => {
|
|
67189
|
+
return this.getImageUrl(pageIndex);
|
|
67190
|
+
}
|
|
67191
|
+
},
|
|
67192
|
+
imgSize: {
|
|
67193
|
+
...propertyConfig,
|
|
67194
|
+
value: (pageIndex) => {
|
|
67195
|
+
return this.getImageSize(pageIndex);
|
|
67196
|
+
}
|
|
67169
67197
|
}
|
|
67170
67198
|
});
|
|
67171
67199
|
}
|
|
@@ -67255,6 +67283,23 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67255
67283
|
}
|
|
67256
67284
|
}
|
|
67257
67285
|
};
|
|
67286
|
+
keyBoardEvents = (event) => {
|
|
67287
|
+
if (event.key === "ArrowLeft") {
|
|
67288
|
+
this.footer.emit("prevStep");
|
|
67289
|
+
} else if (event.key === "ArrowRight") {
|
|
67290
|
+
this.footer.emit("nextStep");
|
|
67291
|
+
} else if (event.key === "ArrowUp") {
|
|
67292
|
+
this.footer.emit("prevPage");
|
|
67293
|
+
} else if (event.key === "ArrowDown") {
|
|
67294
|
+
this.footer.emit("nextPage");
|
|
67295
|
+
}
|
|
67296
|
+
};
|
|
67297
|
+
bindKeyBoardEvent() {
|
|
67298
|
+
document.addEventListener("keydown", this.keyBoardEvents);
|
|
67299
|
+
}
|
|
67300
|
+
unbindKeyBoarEvent() {
|
|
67301
|
+
document.removeEventListener("keydown", this.keyBoardEvents);
|
|
67302
|
+
}
|
|
67258
67303
|
async initialize(option) {
|
|
67259
67304
|
this.prefix = option.prefix;
|
|
67260
67305
|
this.taskId = option.taskId;
|
|
@@ -67310,30 +67355,34 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67310
67355
|
});
|
|
67311
67356
|
this.slide.setResource(option.taskId, option.prefix);
|
|
67312
67357
|
this.sideBar.initialize(json.slideCount, option);
|
|
67313
|
-
this.slide.on(
|
|
67358
|
+
this.slide.on(import_slide.SLIDE_EVENTS.syncDispatch, (event) => {
|
|
67314
67359
|
this.getMap(this.name).set("syncSlide", {
|
|
67315
67360
|
slideState: this.slide.slideState,
|
|
67316
67361
|
dispatch: event
|
|
67317
67362
|
});
|
|
67318
67363
|
});
|
|
67319
|
-
this.slide.on(
|
|
67364
|
+
this.slide.on(import_slide.SLIDE_EVENTS.mainSeqStepStart, (animateIndex) => {
|
|
67320
67365
|
this.emitter.emit("mainSeqStepStart", animateIndex);
|
|
67321
67366
|
});
|
|
67322
|
-
this.slide.on(
|
|
67367
|
+
this.slide.on(import_slide.SLIDE_EVENTS.mainSeqStepEnd, (animateIndex) => {
|
|
67323
67368
|
this.emitter.emit("mainSeqStepEnd", animateIndex);
|
|
67324
67369
|
});
|
|
67325
|
-
this.slide.on(
|
|
67370
|
+
this.slide.on(import_slide.SLIDE_EVENTS.animateStart, () => {
|
|
67371
|
+
this.sideBar.hidden();
|
|
67372
|
+
});
|
|
67373
|
+
this.slide.on(import_slide.SLIDE_EVENTS.renderStart, (slideIndex) => {
|
|
67326
67374
|
this.whiteboardApp.emitter.view.style.opacity = "0";
|
|
67327
67375
|
this.whiteboardApp.emitter.addPage(`${slideIndex}`);
|
|
67328
67376
|
this.whiteboardApp.emitter.gotoPage(`${slideIndex}`);
|
|
67329
67377
|
this.emitter.emit("renderStart", slideIndex);
|
|
67378
|
+
this.sideBar.hidden();
|
|
67330
67379
|
});
|
|
67331
|
-
this.slide.on(
|
|
67380
|
+
this.slide.on(import_slide.SLIDE_EVENTS.renderEnd, (slideIndex) => {
|
|
67332
67381
|
this.currentSlideIndex = slideIndex;
|
|
67333
67382
|
this.whiteboardApp.emitter.view.style.opacity = "1";
|
|
67334
67383
|
this.emitter.emit("renderEnd", slideIndex);
|
|
67335
67384
|
});
|
|
67336
|
-
this.slide.on(
|
|
67385
|
+
this.slide.on(import_slide.SLIDE_EVENTS.stateChange, (state) => {
|
|
67337
67386
|
this.getMap(this.name).set("slideState", state);
|
|
67338
67387
|
});
|
|
67339
67388
|
this.getMap(this.name).observe(this.onSlideEventHandler);
|
|
@@ -67359,8 +67408,30 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67359
67408
|
}
|
|
67360
67409
|
}
|
|
67361
67410
|
});
|
|
67362
|
-
this.permissions.addPermission(7 /* all */);
|
|
67363
67411
|
this.whiteboardApp.disableViewModel();
|
|
67412
|
+
if (this.window) {
|
|
67413
|
+
let prevStatus = "normal";
|
|
67414
|
+
this.window.on("statusChange", (status) => {
|
|
67415
|
+
if (prevStatus === "minimized") {
|
|
67416
|
+
this.bindKeyBoardEvent();
|
|
67417
|
+
prevStatus = status;
|
|
67418
|
+
return;
|
|
67419
|
+
}
|
|
67420
|
+
prevStatus = status;
|
|
67421
|
+
if (status === "normal") {
|
|
67422
|
+
this.bindKeyBoardEvent();
|
|
67423
|
+
} else if (status === "minimized") {
|
|
67424
|
+
this.unbindKeyBoarEvent();
|
|
67425
|
+
}
|
|
67426
|
+
});
|
|
67427
|
+
this.window.on("focusedChange", (status) => {
|
|
67428
|
+
if (status) {
|
|
67429
|
+
this.bindKeyBoardEvent();
|
|
67430
|
+
} else {
|
|
67431
|
+
this.unbindKeyBoarEvent();
|
|
67432
|
+
}
|
|
67433
|
+
});
|
|
67434
|
+
}
|
|
67364
67435
|
window.__forge_slide = this;
|
|
67365
67436
|
window.slidePermissions = this.permissions;
|
|
67366
67437
|
return Promise.resolve(void 0);
|
|
@@ -67374,7 +67445,6 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67374
67445
|
this.slide.destroy();
|
|
67375
67446
|
this.sideBar.dispose();
|
|
67376
67447
|
this.getMap(this.name).unobserve(this.onSlideEventHandler);
|
|
67377
|
-
return Promise.resolve(void 0);
|
|
67378
67448
|
}
|
|
67379
67449
|
};
|
|
67380
67450
|
export {
|