@innovastudio/contentbuilder 1.4.14 → 1.4.15
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
@@ -61716,15 +61716,49 @@ class ElementGeneralStyles {
|
|
61716
61716
|
}
|
61717
61717
|
}
|
61718
61718
|
|
61719
|
-
this.realtimeVisibility(elm);
|
61719
|
+
this.realtimeVisibility(elm, true);
|
61720
61720
|
}
|
61721
61721
|
|
61722
|
-
realtimeVisibility(row) {
|
61722
|
+
realtimeVisibility(row, initialOpen) {
|
61723
|
+
if (initialOpen) {
|
61724
|
+
const builderStuff = this.builder.builderStuff;
|
61725
|
+
const modal = builderStuff.querySelector('.is-modal.content-preview.active');
|
61726
|
+
|
61727
|
+
if (modal) {
|
61728
|
+
let elms = this.panelStuff.querySelectorAll('.input-device');
|
61729
|
+
elms.forEach(elm => {
|
61730
|
+
elm.classList.remove('on');
|
61731
|
+
});
|
61732
|
+
|
61733
|
+
if (modal.classList.contains('is-screen-1920')) {
|
61734
|
+
this.panelStuff.querySelector('.input-device[data-value=""]').classList.add('on');
|
61735
|
+
} else if (modal.classList.contains('is-screen-1440')) {
|
61736
|
+
this.panelStuff.querySelector('.input-device[data-value=""]').classList.add('on');
|
61737
|
+
} else if (modal.classList.contains('is-screen-1024')) {
|
61738
|
+
this.panelStuff.querySelector('.input-device[data-value="md"]').classList.add('on');
|
61739
|
+
} else if (modal.classList.contains('is-screen-768')) {
|
61740
|
+
this.panelStuff.querySelector('.input-device[data-value="sm"]').classList.add('on');
|
61741
|
+
} else if (modal.classList.contains('is-screen-375')) {
|
61742
|
+
this.panelStuff.querySelector('.input-device[data-value="xs"]').classList.add('on');
|
61743
|
+
}
|
61744
|
+
}
|
61745
|
+
}
|
61746
|
+
|
61723
61747
|
let divTarget = this.panelStuff.querySelector('.div-target');
|
61724
61748
|
let divVisibility = this.panelStuff.querySelector('.div-visibility');
|
61725
61749
|
let target = this.builder.responsive.readTarget(divTarget);
|
61726
61750
|
let valVisibility = this.builder.responsive.getVisibility(row, target);
|
61727
|
-
this.builder.responsive.showVisibility(divVisibility, valVisibility);
|
61751
|
+
this.builder.responsive.showVisibility(divVisibility, valVisibility); // Live Preview Sync
|
61752
|
+
|
61753
|
+
if (target === 'xs') {
|
61754
|
+
if (!initialOpen) this.builder.livePreview.resizePreview(375);
|
61755
|
+
} else if (target === 'sm') {
|
61756
|
+
if (!initialOpen) this.builder.livePreview.resizePreview(768);
|
61757
|
+
} else if (target === 'md') {
|
61758
|
+
if (!initialOpen) this.builder.livePreview.resizePreview(1024);
|
61759
|
+
} else {
|
61760
|
+
if (!initialOpen) this.builder.livePreview.resizePreview(1920);
|
61761
|
+
}
|
61728
61762
|
}
|
61729
61763
|
|
61730
61764
|
}
|