@voicenter-team/opensips-js 1.0.100 → 1.0.102

Sign up to get free protection for your applications and to get access to all the features.
@@ -82416,7 +82416,7 @@ class u_e extends Pw {
82416
82416
  super("WhiteBoard"), this.visualizationConfig = {}, this.rafId = null, this.imageSrc = null, this.konvaDrawer = null, this.selectors = {}, this.mode = void 0, this.mode = e.mode, e.imageSrc && (this.imageSrc = e.imageSrc), this.selectors = {
82417
82417
  ...Rme,
82418
82418
  ...e.selectors || {}
82419
- };
82419
+ }, this.selectors.document || (this.selectors.document = document);
82420
82420
  }
82421
82421
  setupDrawerOptions(e) {
82422
82422
  this.konvaDrawer && this.konvaDrawer.setupDrawerOptions(e);
@@ -82425,26 +82425,26 @@ class u_e extends Pw {
82425
82425
  this.imageSrc = e;
82426
82426
  }
82427
82427
  drawEmptyWhiteboard() {
82428
- const e = document.getElementById(this.selectors.container);
82428
+ const e = this.selectors.document.getElementById(this.selectors.container);
82429
82429
  e.style.setProperty("min-width", "100%"), e.style.setProperty("height", "100%");
82430
- const t = e.clientWidth, n = e.clientHeight;
82430
+ const t = e.clientWidth, n = e.clientHeight, i = this.selectors.konvaContainer ? this.selectors.konvaContainer : this.selectors.drawerContainer;
82431
82431
  this.konvaDrawer = new Ub({
82432
- container: this.selectors.drawerContainer,
82432
+ container: i,
82433
82433
  width: t,
82434
82434
  height: n
82435
82435
  });
82436
- const i = this.konvaDrawer.addLayer();
82437
- this.konvaDrawer.addRect(i, t, n), this.konvaDrawer.initFreeDrawing(i);
82436
+ const s = this.konvaDrawer.addLayer();
82437
+ this.konvaDrawer.addRect(s, t, n), this.konvaDrawer.initFreeDrawing(s);
82438
82438
  }
82439
82439
  async drawImageWhiteboard() {
82440
- const e = document.getElementById(this.selectors.container), t = e.clientWidth, n = e.clientHeight, i = await dde(this.imageSrc);
82440
+ const e = this.selectors.document.getElementById(this.selectors.container), t = e.clientWidth, n = e.clientHeight, i = await dde(this.imageSrc), s = this.selectors.konvaContainer ? this.selectors.konvaContainer : this.selectors.drawerContainer;
82441
82441
  this.konvaDrawer = new Ub({
82442
- container: this.selectors.drawerContainer,
82442
+ container: s,
82443
82443
  width: t,
82444
82444
  height: n
82445
82445
  });
82446
- const s = this.konvaDrawer.addLayer();
82447
- this.konvaDrawer.addImage(s, i), s.batchDraw(), this.konvaDrawer.initFreeDrawing(s);
82446
+ const a = this.konvaDrawer.addLayer();
82447
+ this.konvaDrawer.addImage(a, i), a.batchDraw(), this.konvaDrawer.initFreeDrawing(a);
82448
82448
  }
82449
82449
  async generateStream() {
82450
82450
  if (this.mode === Yx.WHITEBOARD)
@@ -82453,7 +82453,7 @@ class u_e extends Pw {
82453
82453
  await this.drawImageWhiteboard();
82454
82454
  else
82455
82455
  return;
82456
- const t = document.getElementById(this.selectors.drawerContainer).querySelector("canvas"), n = t.getContext("2d");
82456
+ const t = this.selectors.document.getElementById(this.selectors.drawerContainer).querySelector("canvas"), n = t.getContext("2d");
82457
82457
  function i() {
82458
82458
  n.fillRect(0, 0, 1, 1), requestAnimationFrame(i);
82459
82459
  }