@innovastudio/contentbuilder 1.2.16 → 1.2.17

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.16",
3
+ "version": "1.2.17",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
@@ -21616,16 +21616,15 @@ const renderSnippetPanel = builder => {
21616
21616
  animation: 150,
21617
21617
  onChoose: () => {
21618
21618
  // Make moving draggable item scaled & positioned correctly (due to zoom value)
21619
- const newCss = `
21620
- <style id="css-scale">
21621
- .sortable-drag::before {
21622
- transform: scale(1);
21623
- }
21624
- </style>
21625
- `;
21619
+ // const newCss = `
21620
+ // <style id="css-scale">
21621
+ // .sortable-drag::before {
21622
+ // transform: scale(1);
21623
+ // }
21624
+ // </style>
21625
+ // `;
21626
21626
  const oldCss = builder.contentStuff.querySelector('#css-scale');
21627
- if (oldCss) oldCss.parentNode.removeChild(oldCss);
21628
- builder.contentStuff.insertAdjacentHTML('afterbegin', newCss);
21627
+ if (oldCss) oldCss.parentNode.removeChild(oldCss); // builder.contentStuff.insertAdjacentHTML('afterbegin', newCss);
21629
21628
  },
21630
21629
  onMove: () => {
21631
21630
  let emptyinfo = document.querySelector('.row-add-initial'); // if there is empty info, remove it during snippet drag drop
@@ -70203,9 +70202,17 @@ class ContentBuilder {
70203
70202
  // & comment the direction setting above
70204
70203
  onChoose: () => {
70205
70204
  // Get zoom (scale) value
70206
- const area = this.doc.querySelector('.is-builder'); // get one of the builder area
70205
+ let scale;
70206
+
70207
+ if (this.opts.page !== '') {
70208
+ const wrapper = this.doc.querySelector(this.opts.page);
70209
+ scale = dom.getScale(wrapper);
70210
+ } else {
70211
+ const area = this.doc.querySelector('.is-builder'); // get one of the builder area
70212
+
70213
+ scale = dom.getScale(area);
70214
+ } // Make moving draggable item scaled & positioned correctly (due to zoom value)
70207
70215
 
70208
- const scale = dom.getScale(area); // Make moving draggable item scaled & positioned correctly (due to zoom value)
70209
70216
 
70210
70217
  const newCss = `
70211
70218
  <style id="css-scale">