@innovastudio/contentbox 1.2.26 → 1.2.29
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
|
@@ -2423,7 +2423,9 @@ class EditSection {
|
|
|
2423
2423
|
const activeSection = this.builder.activeSection;
|
|
2424
2424
|
activeSection.removeAttribute('data-bottom-top');
|
|
2425
2425
|
activeSection.removeAttribute('data-300-bottom');
|
|
2426
|
-
activeSection.removeAttribute('data-400-bottom');
|
|
2426
|
+
activeSection.removeAttribute('data-400-bottom'); //remove old (backward compatible)
|
|
2427
|
+
|
|
2428
|
+
activeSection.removeAttribute('data-center-top');
|
|
2427
2429
|
activeSection.removeAttribute('data-anim-start');
|
|
2428
2430
|
activeSection.style.transform = '';
|
|
2429
2431
|
|
|
@@ -2436,10 +2438,10 @@ class EditSection {
|
|
|
2436
2438
|
activeSection.setAttribute('data-300-bottom', 'transform:translateX(0%) translateY(0%) scale(1)');
|
|
2437
2439
|
} else if (s === 'slide-left') {
|
|
2438
2440
|
activeSection.setAttribute('data-bottom-top', 'transform:translateX(100%) translateY(0%) scale(1)');
|
|
2439
|
-
activeSection.setAttribute('data-
|
|
2441
|
+
activeSection.setAttribute('data-center-top', 'transform:translateX(0%) translateY(0%) scale(1)'); //400 is shorter than 300
|
|
2440
2442
|
} else if (s === 'slide-right') {
|
|
2441
2443
|
activeSection.setAttribute('data-bottom-top', 'transform:translateX(-100%) translateY(0%) scale(1)');
|
|
2442
|
-
activeSection.setAttribute('data-
|
|
2444
|
+
activeSection.setAttribute('data-center-top', 'transform:translateX(0%) translateY(0%) scale(1)');
|
|
2443
2445
|
}
|
|
2444
2446
|
|
|
2445
2447
|
activeSection.setAttribute('data-anim-start', s);
|
|
@@ -9141,14 +9143,20 @@ class EditBox {
|
|
|
9141
9143
|
const chkBoxBgImageGrayscale = modalEditBox.querySelector('.chk-box-bgimage-grayscale');
|
|
9142
9144
|
chkBoxBgImageGrayscale.addEventListener('click', () => {
|
|
9143
9145
|
const activeBox = this.builder.activeBox;
|
|
9146
|
+
const overlay = activeBox.querySelector('.is-overlay');
|
|
9144
9147
|
const overlayBg = activeBox.querySelector('.is-overlay-bg');
|
|
9145
9148
|
|
|
9146
9149
|
if (chkBoxBgImageGrayscale.checked) {
|
|
9147
9150
|
overlayBg.style.filter = 'grayscale(1)';
|
|
9151
|
+
overlay.style.filter = 'grayscale(1)';
|
|
9148
9152
|
} else {
|
|
9149
9153
|
if (overlayBg.style.filter) {
|
|
9150
9154
|
overlayBg.style.filter = overlayBg.style.filter.replace('grayscale(1)', '');
|
|
9151
9155
|
}
|
|
9156
|
+
|
|
9157
|
+
if (overlay.style.filter) {
|
|
9158
|
+
overlay.style.filter = overlay.style.filter.replace('grayscale(1)', '');
|
|
9159
|
+
}
|
|
9152
9160
|
}
|
|
9153
9161
|
});
|
|
9154
9162
|
const chkBoxAddText = modalEditBox.querySelector('.cmd-box-addtext');
|
|
@@ -9442,6 +9450,7 @@ class EditBox {
|
|
|
9442
9450
|
const builderStuff = this.builderStuff;
|
|
9443
9451
|
const modalEditBox = builderStuff.querySelector('.is-modal.editbox');
|
|
9444
9452
|
const activeBox = this.builder.activeBox;
|
|
9453
|
+
let overlay = activeBox.querySelector('.is-overlay');
|
|
9445
9454
|
const overlayBg = activeBox.querySelector('.is-overlay-bg');
|
|
9446
9455
|
const overlayVideo = activeBox.querySelector('.is-video-bg');
|
|
9447
9456
|
const overlayContent = activeBox.querySelector('.is-overlay-content');
|
|
@@ -9716,10 +9725,21 @@ class EditBox {
|
|
|
9716
9725
|
if (url !== '') {
|
|
9717
9726
|
divPreview.innerHTML = `<img src="${url}">`;
|
|
9718
9727
|
|
|
9728
|
+
if (overlay) {
|
|
9729
|
+
if (overlay.style.filter) {
|
|
9730
|
+
if (overlay.style.filter.indexOf('grayscale') !== -1) {
|
|
9731
|
+
chkImageGrayscale.checked = true;
|
|
9732
|
+
}
|
|
9733
|
+
}
|
|
9734
|
+
}
|
|
9735
|
+
|
|
9719
9736
|
if (overlayBg) {
|
|
9720
9737
|
if (overlayBg.style.filter) {
|
|
9721
9738
|
if (overlayBg.style.filter.indexOf('grayscale') !== -1) {
|
|
9722
9739
|
chkImageGrayscale.checked = true;
|
|
9740
|
+
overlay.style.filter = 'grayscale(1)'; // change filter from -is-overlay-bg to is-overlay (to prevent conflict with animation)
|
|
9741
|
+
|
|
9742
|
+
overlayBg.style.filter = overlayBg.style.filter.replace('grayscale(1)', '');
|
|
9723
9743
|
}
|
|
9724
9744
|
}
|
|
9725
9745
|
}
|
|
@@ -9753,8 +9773,6 @@ class EditBox {
|
|
|
9753
9773
|
} // FIX OLD VERSION
|
|
9754
9774
|
|
|
9755
9775
|
|
|
9756
|
-
let overlay = activeBox.querySelector('.is-overlay');
|
|
9757
|
-
|
|
9758
9776
|
if (overlay) ; else {
|
|
9759
9777
|
activeBox.insertAdjacentHTML('afterbegin', '<div class="is-overlay"></div>');
|
|
9760
9778
|
overlay = activeBox.querySelector('.is-overlay');
|