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

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.
@@ -28,6 +28,7 @@ export declare class SlideApplication extends AbstractApplication<SlideApplicati
28
28
  private currentSlideIndex;
29
29
  private taskId;
30
30
  private prefix;
31
+ private slideCount;
31
32
  constructor();
32
33
  private getPreviewImage;
33
34
  private getImageUrl;
@@ -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;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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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;IAC5B,OAAO,CAAC,UAAU,CAAa;;YAkLjB,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;IAqItE,OAAO,CAAC,OAAO;IAIF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CASxC"}
package/dist/index.esm.js CHANGED
@@ -66996,6 +66996,7 @@ var SlideApplication = class extends AbstractApplication2 {
66996
66996
  currentSlideIndex = 0;
66997
66997
  taskId = "";
66998
66998
  prefix = "";
66999
+ slideCount = 0;
66999
67000
  constructor() {
67000
67001
  super();
67001
67002
  window.emitter = this.emitter;
@@ -67011,7 +67012,7 @@ var SlideApplication = class extends AbstractApplication2 {
67011
67012
  this.footer = new FooterView();
67012
67013
  this.sideBar = new SideBarView();
67013
67014
  this.sideBar.on("pageChange", (index) => {
67014
- if (index > 0 && index <= this.slide.slideCount) {
67015
+ if (index > 0 && index <= this.slideCount) {
67015
67016
  this.slide.renderSlide(index);
67016
67017
  }
67017
67018
  });
@@ -67053,7 +67054,7 @@ var SlideApplication = class extends AbstractApplication2 {
67053
67054
  if (!this.permissions.hasPermission(2 /* changePage */)) {
67054
67055
  return;
67055
67056
  }
67056
- if (this.currentSlideIndex < this.slide.slideCount) {
67057
+ if (this.currentSlideIndex < this.slideCount) {
67057
67058
  this.slide.renderSlide(this.currentSlideIndex + 1);
67058
67059
  }
67059
67060
  });
@@ -67094,7 +67095,7 @@ var SlideApplication = class extends AbstractApplication2 {
67094
67095
  });
67095
67096
  Object.defineProperty(this.emitter, "pageCount", {
67096
67097
  get() {
67097
- return that.slide.slideCount;
67098
+ return that.slideCount;
67098
67099
  }
67099
67100
  });
67100
67101
  Object.defineProperty(this.emitter, "goto", {
@@ -67251,6 +67252,8 @@ var SlideApplication = class extends AbstractApplication2 {
67251
67252
  whiteboardApp.userManager = this.userManager;
67252
67253
  whiteboardApp.applicationManager = this.applicationManager;
67253
67254
  const json = await fetch(`${option.prefix}/${option.taskId}/jsonOutput/slide-1.json`).then((res) => res.json());
67255
+ console.log(json.slideCount);
67256
+ this.slideCount = json.slideCount;
67254
67257
  await whiteboardApp.initialize({
67255
67258
  width: json.width,
67256
67259
  height: json.height
@@ -67325,10 +67328,11 @@ var SlideApplication = class extends AbstractApplication2 {
67325
67328
  window.forgeSlide = this;
67326
67329
  const syncSlide = this.getMap(this.name).get("slideState");
67327
67330
  if (syncSlide && syncSlide.taskId === option.taskId) {
67328
- await this.slide.setSlideState(syncSlide);
67331
+ this.slide.setSlideState(syncSlide);
67329
67332
  } else {
67330
67333
  this.slide.renderSlide(1);
67331
67334
  }
67335
+ console.log("pageCount", this.emitter.pageCount);
67332
67336
  this.permissions = new ForgeSlidePermissions(this.userManager, (userId) => {
67333
67337
  return this.userMap(userId);
67334
67338
  });