@netless/app-slide 0.2.45-alpha.1 → 0.2.45
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/index.d.ts +3 -0
- package/dist/main.cjs.js +2 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +12 -2
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +2 -2
- package/dist/main.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/SlideDocsViewer/index.ts +13 -0
- package/src/SlideDocsViewer/style.scss +1 -1
- package/src/index.ts +2 -0
package/package.json
CHANGED
|
@@ -177,9 +177,22 @@ export class SlideDocsViewer {
|
|
|
177
177
|
|
|
178
178
|
protected onRenderStart = () => {
|
|
179
179
|
this.$whiteboardView.classList.add(this.wrapClassName("wb-view-hidden"));
|
|
180
|
+
this.viewer.setPlaying();
|
|
180
181
|
};
|
|
181
182
|
|
|
182
183
|
protected onRenderEnd = () => {
|
|
184
|
+
// 1. There's no render end event on initial render.
|
|
185
|
+
// 2. The end event is fired before the page changed event.
|
|
186
|
+
// So in this callback we will do nothing and we do all "end" works in onPageChanged.
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
public onPageChanged = () => {
|
|
190
|
+
clearTimeout(this._onPageChangedTimer);
|
|
191
|
+
this._onPageChangedTimer = setTimeout(this._onPageChanged, 200);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
private _onPageChangedTimer = 0;
|
|
195
|
+
private _onPageChanged = () => {
|
|
183
196
|
this.$overlay.style.opacity = "";
|
|
184
197
|
this.$whiteboardView.classList.remove(this.wrapClassName("wb-view-hidden"));
|
|
185
198
|
};
|
package/src/index.ts
CHANGED
|
@@ -131,6 +131,8 @@ const SlideApp: NetlessApp<Attributes, MagixEvents, AppOptions, AppResult> = {
|
|
|
131
131
|
}
|
|
132
132
|
log("[Slide] page to", page, synced ? "(synced)" : "");
|
|
133
133
|
docsViewer.viewer.setPageIndex(page - 1);
|
|
134
|
+
docsViewer.viewer.setPaused();
|
|
135
|
+
docsViewer.onPageChanged();
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
|