@innovastudio/contentbuilder 1.3.49 → 1.3.50
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
@@ -67120,6 +67120,7 @@ class Rte {
|
|
67120
67120
|
let zoomButton = builderStuff.querySelectorAll('button.rte-zoom');
|
67121
67121
|
zoomButton.forEach(btn => {
|
67122
67122
|
dom.addEventListener(btn, 'click', () => {
|
67123
|
+
this.rteZoomSlider.value = this.builder.opts.zoom * 100;
|
67123
67124
|
const pop = this.rteZoomOptions;
|
67124
67125
|
const top = btn.getBoundingClientRect().top;
|
67125
67126
|
const left = btn.getBoundingClientRect().left;
|
@@ -68627,6 +68628,83 @@ class Rte {
|
|
68627
68628
|
});
|
68628
68629
|
}
|
68629
68630
|
|
68631
|
+
zoomStart() {
|
68632
|
+
if (this.builder.onZoomStart) {
|
68633
|
+
this.builder.onZoomStart();
|
68634
|
+
}
|
68635
|
+
}
|
68636
|
+
|
68637
|
+
zoom(inp) {
|
68638
|
+
//scale: 0.5 - 1
|
68639
|
+
//val: 50 - 100
|
68640
|
+
let val = inp.value;
|
68641
|
+
let scale = val / 100;
|
68642
|
+
this.builder.opts.zoom = scale;
|
68643
|
+
localStorage.setItem('_zoom', scale); // Save
|
68644
|
+
// setZoomOnArea
|
68645
|
+
|
68646
|
+
this.builder.setZoomOnArea(); // hide tools
|
68647
|
+
|
68648
|
+
let tools = this.builder.doc.querySelectorAll('.is-tool');
|
68649
|
+
Array.prototype.forEach.call(tools, tool => {
|
68650
|
+
tool.style.display = '';
|
68651
|
+
});
|
68652
|
+
tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
68653
|
+
tools.forEach(tool => {
|
68654
|
+
tool.style.display = 'none';
|
68655
|
+
});
|
68656
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
68657
|
+
tools.forEach(tool => {
|
68658
|
+
tool.style.display = 'none';
|
68659
|
+
});
|
68660
|
+
tools = this.builder.doc.querySelectorAll('.is-rowadd-tool');
|
68661
|
+
tools.forEach(tool => {
|
68662
|
+
tool.style.opacity = 0;
|
68663
|
+
});
|
68664
|
+
|
68665
|
+
if (this.builder.onZoom) {
|
68666
|
+
let val = inp.value;
|
68667
|
+
let scale = val / 100;
|
68668
|
+
this.builder.onZoom(scale);
|
68669
|
+
}
|
68670
|
+
}
|
68671
|
+
|
68672
|
+
zoomEnd(inp) {
|
68673
|
+
setTimeout(() => {
|
68674
|
+
// setZoomOnControl
|
68675
|
+
if (this.builder.opts.page !== '') {
|
68676
|
+
const wrapper = this.builder.doc.querySelector(this.builder.opts.page);
|
68677
|
+
this.builder.setZoomOnControl(wrapper);
|
68678
|
+
} else {
|
68679
|
+
const builders = this.builder.doc.querySelectorAll(this.builder.opts.container);
|
68680
|
+
builders.forEach(builder => {
|
68681
|
+
this.builder.setZoomOnControl(builder);
|
68682
|
+
});
|
68683
|
+
} // show & reposition
|
68684
|
+
|
68685
|
+
|
68686
|
+
this.builder.elmTool.repositionElementTool();
|
68687
|
+
let tools = this.builder.doc.querySelectorAll('.is-row-tool');
|
68688
|
+
tools.forEach(tool => {
|
68689
|
+
tool.style.display = '';
|
68690
|
+
});
|
68691
|
+
tools = this.builder.doc.querySelectorAll('.is-rowadd-tool');
|
68692
|
+
tools.forEach(tool => {
|
68693
|
+
tool.style.opacity = '';
|
68694
|
+
});
|
68695
|
+
tools = this.builder.doc.querySelectorAll('.is-col-tool');
|
68696
|
+
tools.forEach(tool => {
|
68697
|
+
tool.style.display = '';
|
68698
|
+
});
|
68699
|
+
|
68700
|
+
if (this.builder.onZoomEnd) {
|
68701
|
+
let val = inp.value;
|
68702
|
+
let scale = val / 100;
|
68703
|
+
this.builder.onZoomEnd(scale);
|
68704
|
+
}
|
68705
|
+
}, 300);
|
68706
|
+
}
|
68707
|
+
|
68630
68708
|
insertImage() {
|
68631
68709
|
const dom = this.dom;
|
68632
68710
|
const modalInsertImage = this.builderStuff.querySelector('.insertimage');
|