@netless/forge-slide 0.1.1-alpha.6 → 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 +2 -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 +176 -100
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +176 -100
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/SiderBarView.ts +24 -3
- package/src/Slide.ts +2 -0
- package/src/SlideApplication.ts +141 -101
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
|
@@ -34,6 +34,8 @@ export declare class SlideForge extends EventEmitter<SlideEvents> implements App
|
|
|
34
34
|
readonly view: HTMLDivElement;
|
|
35
35
|
readonly permissions: ForgeSlidePermissions;
|
|
36
36
|
readonly footView: HTMLDivElement;
|
|
37
|
+
readonly sideBarView: HTMLDivElement;
|
|
38
|
+
readonly whiteboardView: HTMLDivElement;
|
|
37
39
|
/**
|
|
38
40
|
* 当前页面索引, 从 0 开始
|
|
39
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,eAA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;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,EAAC,Y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@@ -66586,6 +66586,8 @@ var SlideForge = class extends EventEmitter14 {
|
|
|
66586
66586
|
view;
|
|
66587
66587
|
permissions;
|
|
66588
66588
|
footView;
|
|
66589
|
+
sideBarView;
|
|
66590
|
+
whiteboardView;
|
|
66589
66591
|
/**
|
|
66590
66592
|
* 当前页面索引, 从 0 开始
|
|
66591
66593
|
*/
|
|
@@ -66869,6 +66871,7 @@ var FooterView = class extends EventEmitter16 {
|
|
|
66869
66871
|
import EventEmitter17 from "eventemitter3";
|
|
66870
66872
|
var SideBarView = class extends EventEmitter17 {
|
|
66871
66873
|
root = document.createElement("div");
|
|
66874
|
+
isShow = false;
|
|
66872
66875
|
itemList = [];
|
|
66873
66876
|
constructor() {
|
|
66874
66877
|
super();
|
|
@@ -66882,13 +66885,14 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66882
66885
|
this.root.style.zIndex = "5";
|
|
66883
66886
|
this.root.style.transition = "left 0.3s ease-in-out";
|
|
66884
66887
|
this.root.style.overflow = "auto";
|
|
66885
|
-
this.root.style.border = "1px solid #ccc";
|
|
66886
|
-
this.root.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.1)";
|
|
66887
66888
|
this.root.style.display = "flex";
|
|
66888
66889
|
this.root.style.flexDirection = "column";
|
|
66889
66890
|
this.root.style.justifyContent = "flex-start";
|
|
66890
66891
|
this.root.style.alignItems = "center";
|
|
66891
66892
|
}
|
|
66893
|
+
get isShowSideBar() {
|
|
66894
|
+
return this.isShow;
|
|
66895
|
+
}
|
|
66892
66896
|
onMouseOver = (itemContainer) => {
|
|
66893
66897
|
itemContainer.style.borderColor = "#ccc";
|
|
66894
66898
|
};
|
|
@@ -66906,7 +66910,6 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66906
66910
|
itemContainer.style.display = "flex";
|
|
66907
66911
|
itemContainer.style.justifyContent = "center";
|
|
66908
66912
|
itemContainer.style.alignItems = "flex-start";
|
|
66909
|
-
itemContainer.style.border = "7px solid transparent";
|
|
66910
66913
|
itemContainer.style.position = "relative";
|
|
66911
66914
|
itemContainer.style.borderRadius = "4px";
|
|
66912
66915
|
itemContainer.style.transition = "border-color .3s";
|
|
@@ -66931,6 +66934,24 @@ var SideBarView = class extends EventEmitter17 {
|
|
|
66931
66934
|
this.root.appendChild(itemContainer);
|
|
66932
66935
|
}
|
|
66933
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
|
+
}
|
|
66934
66955
|
dispose() {
|
|
66935
66956
|
this.itemList.forEach((item) => {
|
|
66936
66957
|
item.removeEventListener("mouseover", () => this.onMouseOver(item));
|
|
@@ -67063,103 +67084,116 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67063
67084
|
if (!this.permissions.hasPermission(2 /* changePage */)) {
|
|
67064
67085
|
return;
|
|
67065
67086
|
}
|
|
67066
|
-
if (this.sideBar.
|
|
67067
|
-
this.sideBar.
|
|
67087
|
+
if (this.sideBar.isShowSideBar) {
|
|
67088
|
+
this.sideBar.hidden();
|
|
67068
67089
|
} else {
|
|
67069
|
-
this.sideBar.
|
|
67090
|
+
this.sideBar.show();
|
|
67070
67091
|
}
|
|
67071
67092
|
});
|
|
67072
67093
|
this.rootView.appendChild(this.contentContainer);
|
|
67073
67094
|
this.emitter.on("renderStart", (pageIndex) => {
|
|
67074
67095
|
this.footer.prevPageState(pageIndex !== 0);
|
|
67075
67096
|
});
|
|
67076
|
-
const
|
|
67077
|
-
|
|
67078
|
-
get() {
|
|
67079
|
-
return that.rootView;
|
|
67080
|
-
}
|
|
67081
|
-
});
|
|
67082
|
-
Object.defineProperty(this.emitter, "permissions", {
|
|
67083
|
-
get() {
|
|
67084
|
-
return that.permissions;
|
|
67085
|
-
}
|
|
67086
|
-
});
|
|
67087
|
-
Object.defineProperty(this.emitter, "footView", {
|
|
67088
|
-
get() {
|
|
67089
|
-
return that.footer.root;
|
|
67090
|
-
}
|
|
67091
|
-
});
|
|
67092
|
-
Object.defineProperty(this.emitter, "pageIndex", {
|
|
67093
|
-
get() {
|
|
67094
|
-
return that.currentSlideIndex;
|
|
67095
|
-
}
|
|
67096
|
-
});
|
|
67097
|
-
Object.defineProperty(this.emitter, "pageCount", {
|
|
67098
|
-
get() {
|
|
67099
|
-
return that.slideCount;
|
|
67100
|
-
}
|
|
67101
|
-
});
|
|
67102
|
-
Object.defineProperty(this.emitter, "goto", {
|
|
67103
|
-
writable: false,
|
|
67104
|
-
enumerable: false,
|
|
67105
|
-
value: (pageIndex) => {
|
|
67106
|
-
this.sideBar.emit("pageChange", pageIndex);
|
|
67107
|
-
}
|
|
67108
|
-
});
|
|
67109
|
-
Object.defineProperty(this.emitter, "nextStep", {
|
|
67110
|
-
writable: false,
|
|
67111
|
-
enumerable: false,
|
|
67112
|
-
value: () => {
|
|
67113
|
-
this.footer.emit("nextStep");
|
|
67114
|
-
}
|
|
67115
|
-
});
|
|
67116
|
-
Object.defineProperty(this.emitter, "prevStep", {
|
|
67117
|
-
writable: false,
|
|
67118
|
-
enumerable: false,
|
|
67119
|
-
value: () => {
|
|
67120
|
-
this.footer.emit("prevStep");
|
|
67121
|
-
}
|
|
67122
|
-
});
|
|
67123
|
-
Object.defineProperty(this.emitter, "nextPage", {
|
|
67124
|
-
writable: false,
|
|
67097
|
+
const propertyConfig = {
|
|
67098
|
+
configurable: false,
|
|
67125
67099
|
enumerable: false,
|
|
67126
|
-
|
|
67127
|
-
|
|
67128
|
-
|
|
67129
|
-
|
|
67130
|
-
|
|
67131
|
-
|
|
67132
|
-
|
|
67133
|
-
|
|
67134
|
-
|
|
67135
|
-
|
|
67136
|
-
|
|
67137
|
-
|
|
67138
|
-
|
|
67139
|
-
|
|
67140
|
-
|
|
67141
|
-
|
|
67142
|
-
|
|
67143
|
-
|
|
67144
|
-
|
|
67145
|
-
|
|
67146
|
-
|
|
67147
|
-
|
|
67148
|
-
|
|
67149
|
-
}
|
|
67150
|
-
|
|
67151
|
-
|
|
67152
|
-
|
|
67153
|
-
|
|
67154
|
-
|
|
67155
|
-
|
|
67156
|
-
|
|
67157
|
-
|
|
67158
|
-
|
|
67159
|
-
|
|
67160
|
-
|
|
67161
|
-
|
|
67162
|
-
|
|
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
|
+
}
|
|
67163
67197
|
}
|
|
67164
67198
|
});
|
|
67165
67199
|
}
|
|
@@ -67249,6 +67283,23 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67249
67283
|
}
|
|
67250
67284
|
}
|
|
67251
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
|
+
}
|
|
67252
67303
|
async initialize(option) {
|
|
67253
67304
|
this.prefix = option.prefix;
|
|
67254
67305
|
this.taskId = option.taskId;
|
|
@@ -67304,30 +67355,34 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67304
67355
|
});
|
|
67305
67356
|
this.slide.setResource(option.taskId, option.prefix);
|
|
67306
67357
|
this.sideBar.initialize(json.slideCount, option);
|
|
67307
|
-
this.slide.on(
|
|
67358
|
+
this.slide.on(import_slide.SLIDE_EVENTS.syncDispatch, (event) => {
|
|
67308
67359
|
this.getMap(this.name).set("syncSlide", {
|
|
67309
67360
|
slideState: this.slide.slideState,
|
|
67310
67361
|
dispatch: event
|
|
67311
67362
|
});
|
|
67312
67363
|
});
|
|
67313
|
-
this.slide.on(
|
|
67364
|
+
this.slide.on(import_slide.SLIDE_EVENTS.mainSeqStepStart, (animateIndex) => {
|
|
67314
67365
|
this.emitter.emit("mainSeqStepStart", animateIndex);
|
|
67315
67366
|
});
|
|
67316
|
-
this.slide.on(
|
|
67367
|
+
this.slide.on(import_slide.SLIDE_EVENTS.mainSeqStepEnd, (animateIndex) => {
|
|
67317
67368
|
this.emitter.emit("mainSeqStepEnd", animateIndex);
|
|
67318
67369
|
});
|
|
67319
|
-
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) => {
|
|
67320
67374
|
this.whiteboardApp.emitter.view.style.opacity = "0";
|
|
67321
67375
|
this.whiteboardApp.emitter.addPage(`${slideIndex}`);
|
|
67322
67376
|
this.whiteboardApp.emitter.gotoPage(`${slideIndex}`);
|
|
67323
67377
|
this.emitter.emit("renderStart", slideIndex);
|
|
67378
|
+
this.sideBar.hidden();
|
|
67324
67379
|
});
|
|
67325
|
-
this.slide.on(
|
|
67380
|
+
this.slide.on(import_slide.SLIDE_EVENTS.renderEnd, (slideIndex) => {
|
|
67326
67381
|
this.currentSlideIndex = slideIndex;
|
|
67327
67382
|
this.whiteboardApp.emitter.view.style.opacity = "1";
|
|
67328
67383
|
this.emitter.emit("renderEnd", slideIndex);
|
|
67329
67384
|
});
|
|
67330
|
-
this.slide.on(
|
|
67385
|
+
this.slide.on(import_slide.SLIDE_EVENTS.stateChange, (state) => {
|
|
67331
67386
|
this.getMap(this.name).set("slideState", state);
|
|
67332
67387
|
});
|
|
67333
67388
|
this.getMap(this.name).observe(this.onSlideEventHandler);
|
|
@@ -67353,8 +67408,30 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67353
67408
|
}
|
|
67354
67409
|
}
|
|
67355
67410
|
});
|
|
67356
|
-
this.permissions.addPermission(7 /* all */);
|
|
67357
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
|
+
}
|
|
67358
67435
|
window.__forge_slide = this;
|
|
67359
67436
|
window.slidePermissions = this.permissions;
|
|
67360
67437
|
return Promise.resolve(void 0);
|
|
@@ -67368,7 +67445,6 @@ var SlideApplication = class extends AbstractApplication2 {
|
|
|
67368
67445
|
this.slide.destroy();
|
|
67369
67446
|
this.sideBar.dispose();
|
|
67370
67447
|
this.getMap(this.name).unobserve(this.onSlideEventHandler);
|
|
67371
|
-
return Promise.resolve(void 0);
|
|
67372
67448
|
}
|
|
67373
67449
|
};
|
|
67374
67450
|
export {
|