@innovastudio/contentbuilder 1.5.20 → 1.5.21
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -81959,7 +81959,7 @@ class Common {
|
|
81959
81959
|
|
81960
81960
|
if (topTouched && bottomTouched) {
|
81961
81961
|
block.style.top = 0;
|
81962
|
-
block.style.bottom = 0;
|
81962
|
+
if (!block.classList.contains('height-auto')) block.style.bottom = 0; // height-auto should not have bottom=0
|
81963
81963
|
block.style.height = '';
|
81964
81964
|
}
|
81965
81965
|
if (leftTouched && rightTouched) {
|
@@ -81968,13 +81968,21 @@ class Common {
|
|
81968
81968
|
block.style.width = '';
|
81969
81969
|
}
|
81970
81970
|
if (bottomTouched && !topTouched) {
|
81971
|
-
block.style.bottom = 0;
|
81971
|
+
if (!block.classList.contains('height-auto')) block.style.bottom = 0; // height-auto should not have bottom=0
|
81972
81972
|
block.style.height = '';
|
81973
81973
|
}
|
81974
81974
|
if (rightTouched && !leftTouched) {
|
81975
81975
|
block.style.right = 0;
|
81976
81976
|
block.style.width = '';
|
81977
81977
|
}
|
81978
|
+
|
81979
|
+
// reset
|
81980
|
+
setTimeout(() => {
|
81981
|
+
this.horizontalRulerTop.removeAttribute('data-topTouched');
|
81982
|
+
this.horizontalRulerBottom.removeAttribute('data-bottomTouched');
|
81983
|
+
this.verticalRulerLeft.removeAttribute('data-leftTouched');
|
81984
|
+
this.verticalRulerRight.removeAttribute('data-rightTouched');
|
81985
|
+
}, 10);
|
81978
81986
|
}
|
81979
81987
|
applyPixels(block) {
|
81980
81988
|
const zoom = this.zoom;
|
@@ -83804,6 +83812,15 @@ class Draggable {
|
|
83804
83812
|
if (this.onChange) this.onChange();
|
83805
83813
|
}
|
83806
83814
|
handleSelect(event) {
|
83815
|
+
if (!this.doc.querySelector(this.selector + '.active')) {
|
83816
|
+
// Make the current scrollbar state (visible or not) to stay during the block select (drag or resize)
|
83817
|
+
let scrollbar = this.doc.documentElement.scrollHeight > this.doc.documentElement.clientHeight;
|
83818
|
+
if (!scrollbar) {
|
83819
|
+
this.doc.body.style.overflowY = 'hidden';
|
83820
|
+
} else {
|
83821
|
+
this.doc.body.style.overflowY = 'scroll';
|
83822
|
+
}
|
83823
|
+
}
|
83807
83824
|
const element = event.target;
|
83808
83825
|
if (element.classList.contains('rotate-handle')) return;
|
83809
83826
|
const block = element.closest(this.selector);
|
@@ -83853,6 +83870,9 @@ class Draggable {
|
|
83853
83870
|
this.doc.querySelectorAll(this.selector + '.active').forEach(elm => elm.classList.remove('active'));
|
83854
83871
|
this.doc.querySelectorAll('.block-active').forEach(elm => elm.classList.remove('block-active'));
|
83855
83872
|
if (this.onSelectClear) this.onSelectClear();
|
83873
|
+
|
83874
|
+
// Return back the scrollbar state when clicking on page (not block)
|
83875
|
+
this.doc.body.style.overflowY = ''; // see handleSelect()
|
83856
83876
|
}
|
83857
83877
|
|
83858
83878
|
// Check if multiple selection occurs. If so, add 'multi' class to hide all the handles
|