@innovastudio/contentbuilder 1.2.11 → 1.2.12

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
@@ -16965,7 +16965,7 @@ const renderQuickAdd = builder => {
16965
16965
  elm = quickadd.querySelector('.add-audio');
16966
16966
  dom$H.addEventListener(elm, 'click', () => {
16967
16967
  const mode = quickadd.getAttribute('data-mode');
16968
- let html = `<div style="display:flex;position:relative;margin:15px 0;background:transparent;">
16968
+ let html = `<div style="display:flex;width:100%;position:relative;margin:15px 0;background:transparent;">
16969
16969
  <audio controls="" style="width:100%">
16970
16970
  <source src="${builder.opts.snippetPath}example.mp3" type="audio/mpeg">
16971
16971
  Your browser does not support the audio element.
@@ -16973,7 +16973,7 @@ const renderQuickAdd = builder => {
16973
16973
  </div>`;
16974
16974
 
16975
16975
  if (builder.opts.snippetSampleAudio) {
16976
- html = `<div style="display:flex;position:relative;margin:15px 0;background:transparent;">
16976
+ html = `<div style="display:flex;width:100%;position:relative;margin:15px 0;background:transparent;">
16977
16977
  <audio controls="" style="width:100%">
16978
16978
  <source src="${builder.opts.snippetSampleAudio}" type="audio/mpeg">
16979
16979
  Your browser does not support the audio element.
@@ -70175,7 +70175,18 @@ class ContentBuilder {
70175
70175
  let builderStuff = this.util.builderStuff();
70176
70176
  if (!builderStuff) return; // in case the builder is destroyed
70177
70177
 
70178
- const htmlutil = new HtmlUtil(this);
70178
+ const htmlutil = new HtmlUtil(this); // Reset Zoom
70179
+
70180
+ if (this.opts.page !== '') {
70181
+ const wrapper = document.querySelector(this.opts.page);
70182
+ if (wrapper) wrapper.style.transform = '';
70183
+ } else {
70184
+ const builders = document.querySelectorAll(this.opts.container);
70185
+ builders.forEach(builder => {
70186
+ builder.style.transform = '';
70187
+ });
70188
+ }
70189
+
70179
70190
  const builders = document.querySelectorAll(this.opts.container);
70180
70191
  Array.prototype.forEach.call(builders, builder => {
70181
70192
  builder.innerHTML = htmlutil.readHtml(builder, true);
@@ -70192,17 +70203,7 @@ class ContentBuilder {
70192
70203
  });
70193
70204
  this.moveable.destroy();
70194
70205
  this.builderStuff.parentNode.removeChild(this.builderStuff);
70195
- this.builderStuff = null; // Reset Zoom
70196
-
70197
- if (this.opts.page !== '') {
70198
- const wrapper = document.querySelector(this.opts.page);
70199
- wrapper.style.transform = '';
70200
- } else {
70201
- const builders = document.querySelectorAll(this.opts.container);
70202
- builders.forEach(builder => {
70203
- builder.style.transform = '';
70204
- });
70205
- }
70206
+ this.builderStuff = null;
70206
70207
  }
70207
70208
 
70208
70209
  saveImages(handler, onComplete, onBase64Upload) {