@innovastudio/contentbuilder 1.4.110 → 1.4.111

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.110",
4
+ "version": "1.4.111",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -49811,11 +49811,23 @@ class Image$1 {
49811
49811
  var elementWidth = activeImage.parentNode.offsetWidth - paddingX - borderX;
49812
49812
  //var elementHeight = activeImage.parentNode.offsetHeight - paddingY - borderY;
49813
49813
 
49814
+ let currentWidth;
49814
49815
  if (!bCircular) {
49815
- var parentWidth = elementWidth; //activeImage.parentNode.offsetWidth;
49816
- var currentWidth = activeImage.offsetWidth;
49817
- var percentage = currentWidth / parentWidth * 100;
49816
+ const parentWidth = elementWidth; //activeImage.parentNode.offsetWidth;
49817
+ currentWidth = activeImage.offsetWidth;
49818
+ const percentage = currentWidth / parentWidth * 100;
49818
49819
  activeImage.style.width = percentage + '%';
49820
+ } else {
49821
+ const _screenwidth = window.innerWidth;
49822
+ currentWidth = activeImage.offsetWidth;
49823
+ const percentage = currentWidth / _screenwidth * 100;
49824
+ activeImage.style.width = percentage + 'vw';
49825
+ activeImage.style.height = percentage + 'vw';
49826
+ const img = activeImage.querySelector('img');
49827
+ if (img) {
49828
+ img.style.width = '100%';
49829
+ img.style.height = '100%';
49830
+ }
49819
49831
  }
49820
49832
  if (this.builder.opts.emailMode) {
49821
49833
  //activeImage.setAttribute('width', percentage + '%');