@innovastudio/contentbuilder 1.5.20 → 1.5.22

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.5.20",
4
+ "version": "1.5.22",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -74091,7 +74091,6 @@ class ContentStuff {
74091
74091
  display:flex;
74092
74092
  }
74093
74093
 
74094
-
74095
74094
  .row-outline .is-rowadd-tool,
74096
74095
  .row-active .is-rowadd-tool {
74097
74096
  display:block;
@@ -74500,6 +74499,12 @@ class ContentStuff {
74500
74499
  /*padding: 0 2px 4px !important;*/
74501
74500
  z-index: 1 !important;
74502
74501
  }
74502
+
74503
+ /* Row Lock will hide row tool */
74504
+ .row-lock .is-row-tool,
74505
+ .row-lock .is-rowadd-tool {
74506
+ display: none !important;
74507
+ }
74503
74508
 
74504
74509
  div[data-html] {
74505
74510
  min-height: 70px;
@@ -81959,7 +81964,7 @@ class Common {
81959
81964
 
81960
81965
  if (topTouched && bottomTouched) {
81961
81966
  block.style.top = 0;
81962
- block.style.bottom = 0;
81967
+ if (!block.classList.contains('height-auto')) block.style.bottom = 0; // height-auto should not have bottom=0
81963
81968
  block.style.height = '';
81964
81969
  }
81965
81970
  if (leftTouched && rightTouched) {
@@ -81968,13 +81973,21 @@ class Common {
81968
81973
  block.style.width = '';
81969
81974
  }
81970
81975
  if (bottomTouched && !topTouched) {
81971
- block.style.bottom = 0;
81976
+ if (!block.classList.contains('height-auto')) block.style.bottom = 0; // height-auto should not have bottom=0
81972
81977
  block.style.height = '';
81973
81978
  }
81974
81979
  if (rightTouched && !leftTouched) {
81975
81980
  block.style.right = 0;
81976
81981
  block.style.width = '';
81977
81982
  }
81983
+
81984
+ // reset
81985
+ setTimeout(() => {
81986
+ this.horizontalRulerTop.removeAttribute('data-topTouched');
81987
+ this.horizontalRulerBottom.removeAttribute('data-bottomTouched');
81988
+ this.verticalRulerLeft.removeAttribute('data-leftTouched');
81989
+ this.verticalRulerRight.removeAttribute('data-rightTouched');
81990
+ }, 10);
81978
81991
  }
81979
81992
  applyPixels(block) {
81980
81993
  const zoom = this.zoom;
@@ -83804,6 +83817,15 @@ class Draggable {
83804
83817
  if (this.onChange) this.onChange();
83805
83818
  }
83806
83819
  handleSelect(event) {
83820
+ if (!this.doc.querySelector(this.selector + '.active')) {
83821
+ // Make the current scrollbar state (visible or not) to stay during the block select (drag or resize)
83822
+ let scrollbar = this.doc.documentElement.scrollHeight > this.doc.documentElement.clientHeight;
83823
+ if (!scrollbar) {
83824
+ this.doc.body.style.overflowY = 'hidden';
83825
+ } else {
83826
+ this.doc.body.style.overflowY = 'scroll';
83827
+ }
83828
+ }
83807
83829
  const element = event.target;
83808
83830
  if (element.classList.contains('rotate-handle')) return;
83809
83831
  const block = element.closest(this.selector);
@@ -83853,6 +83875,9 @@ class Draggable {
83853
83875
  this.doc.querySelectorAll(this.selector + '.active').forEach(elm => elm.classList.remove('active'));
83854
83876
  this.doc.querySelectorAll('.block-active').forEach(elm => elm.classList.remove('block-active'));
83855
83877
  if (this.onSelectClear) this.onSelectClear();
83878
+
83879
+ // Return back the scrollbar state when clicking on page (not block)
83880
+ this.doc.body.style.overflowY = ''; // see handleSelect()
83856
83881
  }
83857
83882
 
83858
83883
  // Check if multiple selection occurs. If so, add 'multi' class to hide all the handles