@innovastudio/contentbox 1.5.89 → 1.5.90

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.89",
4
+ "version": "1.5.90",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -52,7 +52,7 @@
52
52
  "ws": "^8.13.0"
53
53
  },
54
54
  "dependencies": {
55
- "@innovastudio/contentbuilder": "^1.4.110",
55
+ "@innovastudio/contentbuilder": "^1.4.111",
56
56
  "js-beautify": "^1.14.0"
57
57
  }
58
58
  }
@@ -64929,11 +64929,23 @@ class Image$1 {
64929
64929
  var elementWidth = activeImage.parentNode.offsetWidth - paddingX - borderX;
64930
64930
  //var elementHeight = activeImage.parentNode.offsetHeight - paddingY - borderY;
64931
64931
 
64932
+ let currentWidth;
64932
64933
  if (!bCircular) {
64933
- var parentWidth = elementWidth; //activeImage.parentNode.offsetWidth;
64934
- var currentWidth = activeImage.offsetWidth;
64935
- var percentage = currentWidth / parentWidth * 100;
64934
+ const parentWidth = elementWidth; //activeImage.parentNode.offsetWidth;
64935
+ currentWidth = activeImage.offsetWidth;
64936
+ const percentage = currentWidth / parentWidth * 100;
64936
64937
  activeImage.style.width = percentage + '%';
64938
+ } else {
64939
+ const _screenwidth = window.innerWidth;
64940
+ currentWidth = activeImage.offsetWidth;
64941
+ const percentage = currentWidth / _screenwidth * 100;
64942
+ activeImage.style.width = percentage + 'vw';
64943
+ activeImage.style.height = percentage + 'vw';
64944
+ const img = activeImage.querySelector('img');
64945
+ if (img) {
64946
+ img.style.width = '100%';
64947
+ img.style.height = '100%';
64948
+ }
64937
64949
  }
64938
64950
  if (this.builder.opts.emailMode) {
64939
64951
  //activeImage.setAttribute('width', percentage + '%');