@voicenter-team/opensips-js 1.0.113 → 1.0.115
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/opensips-js.es.js
CHANGED
@@ -82372,16 +82372,19 @@ class Ub {
|
|
82372
82372
|
}
|
82373
82373
|
addImage(e, t) {
|
82374
82374
|
console.log("this.stage.width()", this.stage.width()), console.log("this.stage.height()", this.stage.height()), console.log("imageObj.width", t.width), console.log("imageObj.height", t.height);
|
82375
|
-
|
82375
|
+
let n, i;
|
82376
|
+
const s = t.width / t.height;
|
82377
|
+
this.stage.width() < t.width ? (n = this.stage.width(), i = this.stage.width() / s) : (n = t.width, i = t.width / s), console.log("imageWidth", n), console.log("imageHeight", i);
|
82378
|
+
const a = new Tc.Image({
|
82376
82379
|
image: t,
|
82377
82380
|
x: (this.stage.width() - t.width) / 2,
|
82378
82381
|
// Center horizontally
|
82379
82382
|
y: (this.stage.height() - t.height) / 2,
|
82380
82383
|
// Center vertically
|
82381
|
-
width:
|
82382
|
-
height:
|
82384
|
+
width: n,
|
82385
|
+
height: i
|
82383
82386
|
});
|
82384
|
-
return e.add(
|
82387
|
+
return e.add(a), a;
|
82385
82388
|
}
|
82386
82389
|
// Hack to make the drawings visible after canvas resize
|
82387
82390
|
addWakeupLine(e) {
|