@innovastudio/contentbuilder 1.0.74 → 1.0.77
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
|
@@ -38850,7 +38850,7 @@ class Image {
|
|
|
38850
38850
|
<button title="4x6" data-crop-size="0.6666" style="width: 40px;height: 60px;">4x6</button>
|
|
38851
38851
|
<button title="${util.out('Free')}" data-crop-size="" style="width: 60px;height: 45px;">${util.out('Free')}</button>
|
|
38852
38852
|
</div>
|
|
38853
|
-
<div class="imageedit-preview" style="
|
|
38853
|
+
<div class="imageedit-preview" style="max-width:1000px;width: 100%;max-height: 550px;height: 100%;">
|
|
38854
38854
|
</div>
|
|
38855
38855
|
<div style="margin-top:7px;text-align:right;align-self:flex-end;">
|
|
38856
38856
|
<button title="${util.out('Cancel')}" class="input-cancel classic-secondary">${util.out('Cancel')}</button>
|
|
@@ -39400,7 +39400,7 @@ class Image {
|
|
|
39400
39400
|
}
|
|
39401
39401
|
}
|
|
39402
39402
|
|
|
39403
|
-
preview.innerHTML = '<img src="" style="max-width:100
|
|
39403
|
+
preview.innerHTML = '<img src="" style="max-width:100%;object-fit:contain;height:100%;"/>';
|
|
39404
39404
|
let imagePreview = modalImageEdit.querySelector('img');
|
|
39405
39405
|
imagePreview.src = img.src;
|
|
39406
39406
|
this.cropper = new Cropper(imagePreview, {
|
|
@@ -52780,6 +52780,7 @@ class Rte {
|
|
|
52780
52780
|
let rteIconOptions;
|
|
52781
52781
|
let rteCustomTagOptions;
|
|
52782
52782
|
let rteZoomSlider;
|
|
52783
|
+
let inpZoomSlider;
|
|
52783
52784
|
|
|
52784
52785
|
if (!rteTool) {
|
|
52785
52786
|
let customtag_button = '';
|
|
@@ -53006,6 +53007,16 @@ class Rte {
|
|
|
53006
53007
|
</div>
|
|
53007
53008
|
</div>
|
|
53008
53009
|
|
|
53010
|
+
<div class="is-modal viewzoom">
|
|
53011
|
+
<div class="is-modal-content" style="max-width:250px;height:150px;display:flex;flex-flow:column;justify-content:center;">
|
|
53012
|
+
<div class="is-modal-bar is-draggable">${util.out('Zoom')}</div>
|
|
53013
|
+
|
|
53014
|
+
<div style="display:flex;flex-wrap:wrap;width:100%;padding-top:32px;">
|
|
53015
|
+
<input type="range" min="50" max="100" value="1" class="inp-zoom-slider is-rangeslider">
|
|
53016
|
+
</div>
|
|
53017
|
+
</div>
|
|
53018
|
+
</div>
|
|
53019
|
+
|
|
53009
53020
|
<div class="is-modal insertimage">
|
|
53010
53021
|
<div class="is-modal-content" style="max-width:560px;">
|
|
53011
53022
|
<div class="is-browse-area">
|
|
@@ -53066,7 +53077,8 @@ class Rte {
|
|
|
53066
53077
|
rteZoomOptions = builderStuff.querySelector('.rte-zoom-options');
|
|
53067
53078
|
rteIconOptions = builderStuff.querySelector('.rte-icon-options');
|
|
53068
53079
|
rteCustomTagOptions = builderStuff.querySelector('.rte-customtag-options');
|
|
53069
|
-
rteZoomSlider = builderStuff.querySelector('.rte-zoom-slider');
|
|
53080
|
+
rteZoomSlider = builderStuff.querySelector('.rte-zoom-slider');
|
|
53081
|
+
inpZoomSlider = builderStuff.querySelector('.inp-zoom-slider'); // Prepare for tooltip
|
|
53070
53082
|
|
|
53071
53083
|
let elms = rteTool.querySelectorAll('[title]');
|
|
53072
53084
|
Array.prototype.forEach.call(elms, elm => {
|
|
@@ -53128,6 +53140,7 @@ class Rte {
|
|
|
53128
53140
|
this.rteIconOptions = rteIconOptions;
|
|
53129
53141
|
this.rteCustomTagOptions = rteCustomTagOptions;
|
|
53130
53142
|
this.rteZoomSlider = rteZoomSlider;
|
|
53143
|
+
this.inpZoomSlider = inpZoomSlider;
|
|
53131
53144
|
this.positionToolbar(); // Formatting
|
|
53132
53145
|
|
|
53133
53146
|
let btnRteFormatting = builderStuff.querySelectorAll('button.rte-formatting');
|
|
@@ -53879,6 +53892,91 @@ class Rte {
|
|
|
53879
53892
|
this.builder.onZoomEnd(scale);
|
|
53880
53893
|
}
|
|
53881
53894
|
}, 300);
|
|
53895
|
+
}; // Zoom Modal
|
|
53896
|
+
|
|
53897
|
+
|
|
53898
|
+
this.inpZoomSlider.onfocus = () => {
|
|
53899
|
+
if (this.builder.onZoomStart) {
|
|
53900
|
+
this.builder.onZoomStart();
|
|
53901
|
+
}
|
|
53902
|
+
|
|
53903
|
+
this.inpZoomSlider.blur();
|
|
53904
|
+
};
|
|
53905
|
+
|
|
53906
|
+
this.inpZoomSlider.oninput = () => {
|
|
53907
|
+
//scale: 0.5 - 1
|
|
53908
|
+
//val: 50 - 100
|
|
53909
|
+
let val = this.inpZoomSlider.value;
|
|
53910
|
+
let scale = val / 100;
|
|
53911
|
+
this.builder.opts.zoom = scale;
|
|
53912
|
+
localStorage.setItem('_zoom', scale); // Save
|
|
53913
|
+
// setZoomOnArea
|
|
53914
|
+
|
|
53915
|
+
this.builder.setZoomOnArea(); // hide tools
|
|
53916
|
+
|
|
53917
|
+
/*
|
|
53918
|
+
let tools = this.builderStuff.querySelectorAll('.is-tool');
|
|
53919
|
+
Array.prototype.forEach.call(tools, (tool) => {
|
|
53920
|
+
tool.style.display = '';
|
|
53921
|
+
});
|
|
53922
|
+
let tool = this.builderStuff.querySelector('.is-column-tool');
|
|
53923
|
+
tool.style.display = 'none';
|
|
53924
|
+
tools = document.querySelectorAll('.is-row-tool');
|
|
53925
|
+
tools.forEach(tool=>{
|
|
53926
|
+
tool.style.display = 'none';
|
|
53927
|
+
});
|
|
53928
|
+
tools = document.querySelectorAll('.is-rowadd-tool');
|
|
53929
|
+
tools.forEach(tool=>{
|
|
53930
|
+
tool.style.opacity = 0;
|
|
53931
|
+
});
|
|
53932
|
+
*/
|
|
53933
|
+
|
|
53934
|
+
if (this.builder.onZoom) {
|
|
53935
|
+
let val = this.inpZoomSlider.value;
|
|
53936
|
+
let scale = val / 100;
|
|
53937
|
+
this.builder.onZoom(scale);
|
|
53938
|
+
}
|
|
53939
|
+
};
|
|
53940
|
+
|
|
53941
|
+
this.inpZoomSlider.onchange = () => {
|
|
53942
|
+
setTimeout(() => {
|
|
53943
|
+
// setZoomOnControl
|
|
53944
|
+
if (this.builder.opts.page !== '') {
|
|
53945
|
+
const wrapper = document.querySelector(this.builder.opts.page);
|
|
53946
|
+
this.builder.setZoomOnControl(wrapper);
|
|
53947
|
+
} else {
|
|
53948
|
+
const builders = document.querySelectorAll(this.builder.opts.container);
|
|
53949
|
+
builders.forEach(builder => {
|
|
53950
|
+
this.builder.setZoomOnControl(builder);
|
|
53951
|
+
});
|
|
53952
|
+
} // show & reposition
|
|
53953
|
+
|
|
53954
|
+
/*
|
|
53955
|
+
this.builder.elmTool.repositionElementTool();
|
|
53956
|
+
let col = this.builder.activeCol;
|
|
53957
|
+
let tool = this.builderStuff.querySelector('.is-column-tool');
|
|
53958
|
+
tool.style.display = '';
|
|
53959
|
+
tool.style.top = (col.getBoundingClientRect().top - 29 + window.pageYOffset) + 'px';
|
|
53960
|
+
tool.style.left = (col.getBoundingClientRect().left - 1) + 'px';
|
|
53961
|
+
let tools = document.querySelectorAll('.is-row-tool');
|
|
53962
|
+
tools.forEach(tool=>{
|
|
53963
|
+
tool.style.display = '';
|
|
53964
|
+
});
|
|
53965
|
+
tools = document.querySelectorAll('.is-rowadd-tool');
|
|
53966
|
+
tools.forEach(tool=>{
|
|
53967
|
+
tool.style.opacity = '';
|
|
53968
|
+
});
|
|
53969
|
+
*/
|
|
53970
|
+
|
|
53971
|
+
|
|
53972
|
+
if (this.builder.onZoomEnd) {
|
|
53973
|
+
let val = this.inpZoomSlider.value;
|
|
53974
|
+
let scale = val / 100;
|
|
53975
|
+
this.builder.onZoomEnd(scale);
|
|
53976
|
+
}
|
|
53977
|
+
|
|
53978
|
+
this.rteZoomSlider.value = this.inpZoomSlider.value;
|
|
53979
|
+
}, 300);
|
|
53882
53980
|
}; // Text Settings
|
|
53883
53981
|
|
|
53884
53982
|
|
|
@@ -56895,6 +56993,13 @@ class Rte {
|
|
|
56895
56993
|
}
|
|
56896
56994
|
}
|
|
56897
56995
|
|
|
56996
|
+
viewZoom() {
|
|
56997
|
+
if (this.builder.onZoomOpen) this.builder.onZoomOpen();
|
|
56998
|
+
this.inpZoomSlider.value = this.builder.opts.zoom * 100;
|
|
56999
|
+
const modal = this.builderStuff.querySelector('.viewzoom');
|
|
57000
|
+
this.util.showModal(modal, false, null, false);
|
|
57001
|
+
}
|
|
57002
|
+
|
|
56898
57003
|
}
|
|
56899
57004
|
|
|
56900
57005
|
const dom$4 = new Dom();
|
|
@@ -59347,6 +59452,10 @@ class ContentBuilder {
|
|
|
59347
59452
|
this.preferences.view();
|
|
59348
59453
|
}
|
|
59349
59454
|
|
|
59455
|
+
viewZoom() {
|
|
59456
|
+
this.rte.viewZoom();
|
|
59457
|
+
}
|
|
59458
|
+
|
|
59350
59459
|
loadSnippets(snippetFile) {
|
|
59351
59460
|
if (this.preview) return;
|
|
59352
59461
|
let snippetPanel = document.querySelector(this.opts.snippetList);
|