@innovastudio/contentbuilder 1.4.26 → 1.4.27
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
@@ -77226,7 +77226,12 @@ class LivePreview {
|
|
77226
77226
|
|
77227
77227
|
this.builder.settings.onChange = () => {
|
77228
77228
|
old2.call(this);
|
77229
|
-
|
77229
|
+
|
77230
|
+
if (!this.builder.doc.querySelector('.is-wrapper')) {
|
77231
|
+
// ContentBuilder
|
77232
|
+
this.previewRefresh();
|
77233
|
+
} // For ContentBox, this onChange will trigger ContentBox onChange (which has previewRefresh called)
|
77234
|
+
|
77230
77235
|
};
|
77231
77236
|
}
|
77232
77237
|
}
|
@@ -77312,6 +77317,15 @@ class LivePreview {
|
|
77312
77317
|
}
|
77313
77318
|
} else {
|
77314
77319
|
// ContentBox
|
77320
|
+
if (!this.builder.count) this.builder.count = 0;
|
77321
|
+
this.builder.count++;
|
77322
|
+
let oriVal = this.builder.livePreviewAlwaysReload;
|
77323
|
+
|
77324
|
+
if (this.builder.count === this.builder.livePreviewReloadEvery) {
|
77325
|
+
this.builder.livePreviewAlwaysReload = true;
|
77326
|
+
this.builder.count = 0;
|
77327
|
+
}
|
77328
|
+
|
77315
77329
|
if (this.builder.livePreviewAlwaysReload) {
|
77316
77330
|
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
77317
77331
|
} else {
|
@@ -77397,6 +77411,8 @@ class LivePreview {
|
|
77397
77411
|
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
77398
77412
|
}
|
77399
77413
|
}
|
77414
|
+
|
77415
|
+
this.builder.livePreviewAlwaysReload = oriVal;
|
77400
77416
|
}
|
77401
77417
|
|
77402
77418
|
iframe.onload = () => {
|
@@ -77532,6 +77548,8 @@ class ContentBuilder {
|
|
77532
77548
|
previewStyle: 'top:auto;bottom:50px;left:50px;right:auto;',
|
77533
77549
|
livePreviewOpen: false,
|
77534
77550
|
livePreviewAlwaysReload: false,
|
77551
|
+
livePreviewReloadEvery: 30,
|
77552
|
+
// always reload every 30 onChange triggered (to clearup iframe resource for faster performance)
|
77535
77553
|
scriptPath: '',
|
77536
77554
|
// Deprecated
|
77537
77555
|
// Old way:
|