@netless/forge-slide 0.1.1-alpha.1 → 0.1.1-alpha.2

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.js CHANGED
@@ -67005,6 +67005,7 @@ var SlideApplication = class extends import_forge_room4.AbstractApplication {
67005
67005
  currentSlideIndex = 0;
67006
67006
  taskId = "";
67007
67007
  prefix = "";
67008
+ slideCount = 0;
67008
67009
  constructor() {
67009
67010
  super();
67010
67011
  window.emitter = this.emitter;
@@ -67020,7 +67021,7 @@ var SlideApplication = class extends import_forge_room4.AbstractApplication {
67020
67021
  this.footer = new FooterView();
67021
67022
  this.sideBar = new SideBarView();
67022
67023
  this.sideBar.on("pageChange", (index) => {
67023
- if (index > 0 && index <= this.slide.slideCount) {
67024
+ if (index > 0 && index <= this.slideCount) {
67024
67025
  this.slide.renderSlide(index);
67025
67026
  }
67026
67027
  });
@@ -67062,7 +67063,7 @@ var SlideApplication = class extends import_forge_room4.AbstractApplication {
67062
67063
  if (!this.permissions.hasPermission(2 /* changePage */)) {
67063
67064
  return;
67064
67065
  }
67065
- if (this.currentSlideIndex < this.slide.slideCount) {
67066
+ if (this.currentSlideIndex < this.slideCount) {
67066
67067
  this.slide.renderSlide(this.currentSlideIndex + 1);
67067
67068
  }
67068
67069
  });
@@ -67260,6 +67261,7 @@ var SlideApplication = class extends import_forge_room4.AbstractApplication {
67260
67261
  whiteboardApp.userManager = this.userManager;
67261
67262
  whiteboardApp.applicationManager = this.applicationManager;
67262
67263
  const json = await fetch(`${option.prefix}/${option.taskId}/jsonOutput/slide-1.json`).then((res) => res.json());
67264
+ this.slideCount = json.slideCount;
67263
67265
  await whiteboardApp.initialize({
67264
67266
  width: json.width,
67265
67267
  height: json.height
@@ -67334,7 +67336,7 @@ var SlideApplication = class extends import_forge_room4.AbstractApplication {
67334
67336
  window.forgeSlide = this;
67335
67337
  const syncSlide = this.getMap(this.name).get("slideState");
67336
67338
  if (syncSlide && syncSlide.taskId === option.taskId) {
67337
- await this.slide.setSlideState(syncSlide);
67339
+ this.slide.setSlideState(syncSlide);
67338
67340
  } else {
67339
67341
  this.slide.renderSlide(1);
67340
67342
  }