@innovastudio/contentbuilder 1.2.10 → 1.2.13
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
|
@@ -16965,7 +16965,7 @@ const renderQuickAdd = builder => {
|
|
|
16965
16965
|
elm = quickadd.querySelector('.add-audio');
|
|
16966
16966
|
dom$H.addEventListener(elm, 'click', () => {
|
|
16967
16967
|
const mode = quickadd.getAttribute('data-mode');
|
|
16968
|
-
let html = `<div style="display:flex;position:relative;margin:15px 0;background:transparent;">
|
|
16968
|
+
let html = `<div style="display:flex;width:100%;position:relative;margin:15px 0;background:transparent;">
|
|
16969
16969
|
<audio controls="" style="width:100%">
|
|
16970
16970
|
<source src="${builder.opts.snippetPath}example.mp3" type="audio/mpeg">
|
|
16971
16971
|
Your browser does not support the audio element.
|
|
@@ -16973,7 +16973,7 @@ const renderQuickAdd = builder => {
|
|
|
16973
16973
|
</div>`;
|
|
16974
16974
|
|
|
16975
16975
|
if (builder.opts.snippetSampleAudio) {
|
|
16976
|
-
html = `<div style="display:flex;position:relative;margin:15px 0;background:transparent;">
|
|
16976
|
+
html = `<div style="display:flex;width:100%;position:relative;margin:15px 0;background:transparent;">
|
|
16977
16977
|
<audio controls="" style="width:100%">
|
|
16978
16978
|
<source src="${builder.opts.snippetSampleAudio}" type="audio/mpeg">
|
|
16979
16979
|
Your browser does not support the audio element.
|
|
@@ -21464,7 +21464,7 @@ const renderSnippetPanel = builder => {
|
|
|
21464
21464
|
});
|
|
21465
21465
|
}
|
|
21466
21466
|
});
|
|
21467
|
-
dropDown.toggle();
|
|
21467
|
+
dropDown.toggle(false);
|
|
21468
21468
|
|
|
21469
21469
|
if (builder.opts.snippetList === '#divSnippetList') {
|
|
21470
21470
|
snippetPanel.querySelector('.selectsnippet').style.display = 'none';
|
|
@@ -47385,7 +47385,7 @@ var loadImageOrientation = {exports: {}};
|
|
|
47385
47385
|
var js = loadImage.exports;
|
|
47386
47386
|
|
|
47387
47387
|
const dom$C = new Dom();
|
|
47388
|
-
class Image {
|
|
47388
|
+
class Image$1 {
|
|
47389
47389
|
constructor(builder) {
|
|
47390
47390
|
this.builder = builder;
|
|
47391
47391
|
const util = this.builder.util;
|
|
@@ -52320,7 +52320,7 @@ class Element$1 {
|
|
|
52320
52320
|
this.builderStuff = builderStuff;
|
|
52321
52321
|
this.hyperlink = new Hyperlink(builder);
|
|
52322
52322
|
this.button = new Button(builder);
|
|
52323
|
-
this.image = new Image(builder);
|
|
52323
|
+
this.image = new Image$1(builder);
|
|
52324
52324
|
this.spacer = new Spacer(builder);
|
|
52325
52325
|
this.module = new Module(builder);
|
|
52326
52326
|
this.code = new Code(builder);
|
|
@@ -54919,7 +54919,17 @@ class ColumnTool {
|
|
|
54919
54919
|
|
|
54920
54920
|
<div style="padding-bottom:3px;">${util.out('Scale')}:</div>
|
|
54921
54921
|
<div style="padding-top:4px">
|
|
54922
|
-
<input type="range" min="
|
|
54922
|
+
<input type="range" min="100" max="500" value="0" class="image-scale-slider is-rangeslider">
|
|
54923
|
+
</div>
|
|
54924
|
+
|
|
54925
|
+
<div style="display:none;padding-bottom:3px;padding-top: 20px;">${util.out('Scale')} (${util.out('Width')}):</div>
|
|
54926
|
+
<div style="display:none;padding-top:4px">
|
|
54927
|
+
<input type="range" min="100" max="500" value="100" class="image-container-width-slider is-rangeslider">
|
|
54928
|
+
</div>
|
|
54929
|
+
|
|
54930
|
+
<div style="display:none;padding-bottom:3px;padding-top: 20px;">${util.out('Scale')} (${util.out('Height')}):</div>
|
|
54931
|
+
<div style="display:none;padding-top:4px">
|
|
54932
|
+
<input type="range" min="100" max="500" value="100" class="image-container-height-slider is-rangeslider">
|
|
54923
54933
|
</div>
|
|
54924
54934
|
|
|
54925
54935
|
<div style="padding-bottom:3px;padding-top: 20px;display:flex;justify-content:space-between;align-items:center;">
|
|
@@ -54927,15 +54937,15 @@ class ColumnTool {
|
|
|
54927
54937
|
<button title="${util.out('Reset')}" class="image-hor-reset" style="display:flex;width:30px;height:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>
|
|
54928
54938
|
</div>
|
|
54929
54939
|
<div style="padding-top:4px">
|
|
54930
|
-
<input type="range" min="-
|
|
54940
|
+
<input type="range" min="-150" max="150" value="0" class="image-hor-slider is-rangeslider">
|
|
54931
54941
|
</div>
|
|
54932
54942
|
|
|
54933
54943
|
<div style="padding-bottom:3px;padding-top: 20px;display:flex;justify-content:space-between;align-items:center;">
|
|
54934
|
-
|
|
54935
|
-
|
|
54936
|
-
|
|
54944
|
+
<span>${util.out('Vertical')}:</span>
|
|
54945
|
+
<button title="${util.out('Reset')}" class="image-vert-reset" style="display:flex;width:30px;height:20px;"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>
|
|
54946
|
+
</div>
|
|
54937
54947
|
<div style="padding-top:4px">
|
|
54938
|
-
<input type="range" min="-
|
|
54948
|
+
<input type="range" min="-150" max="150" value="0" class="image-vert-slider is-rangeslider">
|
|
54939
54949
|
</div>
|
|
54940
54950
|
|
|
54941
54951
|
</div>
|
|
@@ -55352,21 +55362,43 @@ class ColumnTool {
|
|
|
55352
55362
|
};
|
|
55353
55363
|
|
|
55354
55364
|
inpImageScaleSlider2.oninput = () => {
|
|
55355
|
-
let cell = this.builder.elementSelected;
|
|
55356
|
-
cell.style.backgroundSize = ''; //val: 0 - 100
|
|
55365
|
+
let cell = this.builder.elementSelected; //val: 100 - 500
|
|
55357
55366
|
|
|
55358
55367
|
let val = inpImageScaleSlider2.value;
|
|
55359
|
-
cell.setAttribute('data-scale', val); // vall => -100-100
|
|
55360
55368
|
|
|
55361
|
-
if (
|
|
55362
|
-
cell.style.width = '
|
|
55363
|
-
cell.style.
|
|
55364
|
-
cell.style.right = `-${val}vw`;
|
|
55369
|
+
if (this.scaleWidth) {
|
|
55370
|
+
cell.style.width = val + '%';
|
|
55371
|
+
cell.style.height = '';
|
|
55365
55372
|
} else {
|
|
55366
|
-
cell.style.
|
|
55367
|
-
cell.style.right = '';
|
|
55373
|
+
cell.style.height = val + '%';
|
|
55368
55374
|
cell.style.width = '';
|
|
55369
55375
|
}
|
|
55376
|
+
|
|
55377
|
+
cell.setAttribute('data-scale', val); // let cell = this.builder.elementSelected;
|
|
55378
|
+
// cell.style.backgroundSize = '';
|
|
55379
|
+
// //val: 0 - 100
|
|
55380
|
+
// let val = inpImageScaleSlider2.value;
|
|
55381
|
+
// cell.setAttribute('data-scale', val);
|
|
55382
|
+
// // vall => -100-100
|
|
55383
|
+
// if(val!==0) {
|
|
55384
|
+
// // cell.style.width = 'unset';
|
|
55385
|
+
// // cell.style.height = 'unset';
|
|
55386
|
+
// cell.style.left = `-${val}vw`;
|
|
55387
|
+
// cell.style.right = `-${val}vw`;
|
|
55388
|
+
// cell.style.top = `-${val}vh`;
|
|
55389
|
+
// cell.style.bottom = `-${val}vh`;
|
|
55390
|
+
// } else {
|
|
55391
|
+
// // cell.style.width = '';
|
|
55392
|
+
// // cell.style.height = '';
|
|
55393
|
+
// cell.style.left = '';
|
|
55394
|
+
// cell.style.right = '';
|
|
55395
|
+
// cell.style.top = '';
|
|
55396
|
+
// cell.style.bottom = '';
|
|
55397
|
+
// }
|
|
55398
|
+
// //val: 100 - 500
|
|
55399
|
+
// let val = inpImageScaleSlider2.value;
|
|
55400
|
+
// let cell = this.builder.elementSelected; //util.cellSelected();
|
|
55401
|
+
// cell.style.backgroundSize = val + '%';
|
|
55370
55402
|
};
|
|
55371
55403
|
|
|
55372
55404
|
inpImageScaleSlider2.onchange = () => {
|
|
@@ -55406,25 +55438,31 @@ class ColumnTool {
|
|
|
55406
55438
|
};
|
|
55407
55439
|
|
|
55408
55440
|
inpImageHorSlider2.oninput = () => {
|
|
55409
|
-
let cell = this.builder.elementSelected;
|
|
55410
|
-
let normalWidth = cell.parentNode.offsetWidth
|
|
55411
|
-
|
|
55412
|
-
|
|
55413
|
-
|
|
55441
|
+
// let cell = this.builder.elementSelected;
|
|
55442
|
+
// let normalWidth = (cell.parentNode.offsetWidth/window.innerWidth) * 100; // vw
|
|
55443
|
+
// let scaleInc = parseFloat(inpImageScaleSlider2.value);
|
|
55444
|
+
// const enlarge = (normalWidth + (2*scaleInc))/normalWidth;
|
|
55445
|
+
// //val: -100 - 100
|
|
55446
|
+
// let val = parseFloat(inpImageHorSlider2.value);
|
|
55447
|
+
// cell.setAttribute('data-x', val);
|
|
55448
|
+
// let currentWidth = cell.parentNode.offsetWidth*enlarge;
|
|
55449
|
+
// currentWidth = (currentWidth/window.innerWidth) * 100; // vw
|
|
55450
|
+
// let currentLeft = (currentWidth-normalWidth)/2; // vw
|
|
55451
|
+
// let currentRight = (currentWidth-normalWidth)/2;
|
|
55452
|
+
// const left = -currentLeft+val;
|
|
55453
|
+
// const right = -currentRight-val;
|
|
55454
|
+
// // cell.style.width = 'unset';
|
|
55455
|
+
// cell.style.left = `${left}vw`;
|
|
55456
|
+
// cell.style.right = `${right}vw`;
|
|
55457
|
+
let cell = this.builder.elementSelected; //val: -100 - 100
|
|
55414
55458
|
|
|
55415
55459
|
let val = parseFloat(inpImageHorSlider2.value);
|
|
55416
|
-
cell.
|
|
55417
|
-
|
|
55418
|
-
|
|
55419
|
-
|
|
55420
|
-
let
|
|
55421
|
-
|
|
55422
|
-
let currentRight = (currentWidth - normalWidth) / 2;
|
|
55423
|
-
const left = -currentLeft + val;
|
|
55424
|
-
const right = -currentRight - val;
|
|
55425
|
-
cell.style.width = 'unset';
|
|
55426
|
-
cell.style.left = `${left}vw`;
|
|
55427
|
-
cell.style.right = `${right}vw`;
|
|
55460
|
+
cell.style.left = `${val}%`;
|
|
55461
|
+
cell.style.right = '';
|
|
55462
|
+
cell.setAttribute('data-x', val); // //val: 0 - 100
|
|
55463
|
+
// let val = inpImageHorSlider2.value;
|
|
55464
|
+
// let cell = this.builder.elementSelected; //util.cellSelected();
|
|
55465
|
+
// cell.style.backgroundPositionX = val + '%';
|
|
55428
55466
|
};
|
|
55429
55467
|
|
|
55430
55468
|
inpImageHorSlider2.onchange = () => {
|
|
@@ -55464,51 +55502,105 @@ class ColumnTool {
|
|
|
55464
55502
|
};
|
|
55465
55503
|
|
|
55466
55504
|
inpImageVertSlider2.oninput = () => {
|
|
55467
|
-
let cell = this.builder.elementSelected;
|
|
55468
|
-
let normalHeight = cell.parentNode.offsetHeight
|
|
55469
|
-
|
|
55470
|
-
|
|
55471
|
-
|
|
55505
|
+
// let cell = this.builder.elementSelected;
|
|
55506
|
+
// let normalHeight = (cell.parentNode.offsetHeight/window.innerHeight) * 100; // vh
|
|
55507
|
+
// let scaleInc = parseFloat(inpImageScaleSlider2.value);
|
|
55508
|
+
// const enlarge = (normalHeight + (2*scaleInc))/normalHeight;
|
|
55509
|
+
// //val: -100 - 100
|
|
55510
|
+
// let val = parseFloat(inpImageVertSlider2.value);
|
|
55511
|
+
// cell.setAttribute('data-y', val);
|
|
55512
|
+
// let currentHeight = cell.parentNode.offsetHeight*enlarge;
|
|
55513
|
+
// currentHeight = (currentHeight/window.innerHeight) * 100; // vh
|
|
55514
|
+
// let currentTop = (currentHeight-normalHeight)/2; // vh
|
|
55515
|
+
// let currentBottom = (currentHeight-normalHeight)/2;
|
|
55516
|
+
// const top = -currentTop+val;
|
|
55517
|
+
// const bottom = -currentBottom-val;
|
|
55518
|
+
// // cell.style.height = 'unset';
|
|
55519
|
+
// cell.style.top = `${top}vh`;
|
|
55520
|
+
// cell.style.bottom = `${bottom}vh`;
|
|
55521
|
+
let cell = this.builder.elementSelected; //val: -100 - 100
|
|
55472
55522
|
|
|
55473
55523
|
let val = parseFloat(inpImageVertSlider2.value);
|
|
55474
|
-
cell.
|
|
55475
|
-
|
|
55476
|
-
|
|
55477
|
-
|
|
55478
|
-
let
|
|
55479
|
-
|
|
55480
|
-
let currentBottom = (currentHeight - normalHeight) / 2;
|
|
55481
|
-
const top = -currentTop + val;
|
|
55482
|
-
const bottom = -currentBottom - val;
|
|
55483
|
-
cell.style.height = 'unset';
|
|
55484
|
-
cell.style.top = `${top}vh`;
|
|
55485
|
-
cell.style.bottom = `${bottom}vh`;
|
|
55524
|
+
cell.style.top = `${val}%`;
|
|
55525
|
+
cell.style.bottom = '';
|
|
55526
|
+
cell.setAttribute('data-y', val); // //val: 0 - 100
|
|
55527
|
+
// let val = inpImageVertSlider2.value;
|
|
55528
|
+
// let cell = this.builder.elementSelected; //util.cellSelected();
|
|
55529
|
+
// cell.style.backgroundPositionY = val + '%';
|
|
55486
55530
|
};
|
|
55487
55531
|
|
|
55488
55532
|
inpImageVertSlider2.onchange = () => {
|
|
55489
55533
|
//Trigger Change event
|
|
55490
55534
|
this.builder.opts.onChange();
|
|
55535
|
+
}; // Image Container Width
|
|
55536
|
+
|
|
55537
|
+
|
|
55538
|
+
const inpImageConWidthSlider = imageAdjust2.querySelector('.image-container-width-slider');
|
|
55539
|
+
|
|
55540
|
+
inpImageConWidthSlider.onfocus = () => {
|
|
55541
|
+
this.builder.uo.saveForUndo(true);
|
|
55542
|
+
};
|
|
55543
|
+
|
|
55544
|
+
inpImageConWidthSlider.oninput = () => {
|
|
55545
|
+
let cell = this.builder.elementSelected; //val: 100 - 500
|
|
55546
|
+
|
|
55547
|
+
let val = parseFloat(inpImageConWidthSlider.value);
|
|
55548
|
+
cell.setAttribute('data-con-w', val);
|
|
55549
|
+
cell.style.width = `${val}%`;
|
|
55550
|
+
};
|
|
55551
|
+
|
|
55552
|
+
inpImageConWidthSlider.onchange = () => {
|
|
55553
|
+
this.builder.opts.onChange();
|
|
55554
|
+
}; // Image Container Height
|
|
55555
|
+
|
|
55556
|
+
|
|
55557
|
+
const inpImageConHeightSlider = imageAdjust2.querySelector('.image-container-height-slider');
|
|
55558
|
+
|
|
55559
|
+
inpImageConHeightSlider.onfocus = () => {
|
|
55560
|
+
this.builder.uo.saveForUndo(true);
|
|
55561
|
+
};
|
|
55562
|
+
|
|
55563
|
+
inpImageConHeightSlider.oninput = () => {
|
|
55564
|
+
let cell = this.builder.elementSelected; //val: 100 - 500
|
|
55565
|
+
|
|
55566
|
+
let val = parseFloat(inpImageConHeightSlider.value);
|
|
55567
|
+
cell.setAttribute('data-con-h', val);
|
|
55568
|
+
cell.style.height = `${val}%`;
|
|
55569
|
+
};
|
|
55570
|
+
|
|
55571
|
+
inpImageConHeightSlider.onchange = () => {
|
|
55572
|
+
this.builder.opts.onChange();
|
|
55491
55573
|
};
|
|
55492
55574
|
|
|
55493
55575
|
const btnHorReset = imageAdjust2.querySelector('.image-hor-reset');
|
|
55494
55576
|
btnHorReset.addEventListener('click', () => {
|
|
55495
55577
|
this.builder.uo.saveForUndo();
|
|
55496
55578
|
let cell = this.builder.elementSelected;
|
|
55497
|
-
inpImageHorSlider2.value = 0;
|
|
55498
|
-
|
|
55579
|
+
inpImageHorSlider2.value = 0; // cell.style.width = '';
|
|
55580
|
+
|
|
55499
55581
|
cell.style.left = '';
|
|
55500
55582
|
cell.style.right = '';
|
|
55501
|
-
cell.removeAttribute('data-x');
|
|
55583
|
+
cell.removeAttribute('data-x'); // // fix
|
|
55584
|
+
// cell.style.backgroundPositionX = '';
|
|
55585
|
+
// inpImageHorSlider2.value = 50;
|
|
55586
|
+
//Trigger Change event
|
|
55587
|
+
|
|
55588
|
+
this.builder.opts.onChange();
|
|
55502
55589
|
});
|
|
55503
55590
|
const btnVertReset = imageAdjust2.querySelector('.image-vert-reset');
|
|
55504
55591
|
btnVertReset.addEventListener('click', () => {
|
|
55505
55592
|
this.builder.uo.saveForUndo();
|
|
55506
55593
|
let cell = this.builder.elementSelected;
|
|
55507
|
-
inpImageVertSlider2.value = 0;
|
|
55508
|
-
|
|
55594
|
+
inpImageVertSlider2.value = 0; // cell.style.height = '';
|
|
55595
|
+
|
|
55509
55596
|
cell.style.top = '';
|
|
55510
55597
|
cell.style.bottom = '';
|
|
55511
|
-
cell.removeAttribute('data-y');
|
|
55598
|
+
cell.removeAttribute('data-y'); // // fix
|
|
55599
|
+
// cell.style.backgroundPositionY = '';
|
|
55600
|
+
// inpImageVertSlider2.value = 60;
|
|
55601
|
+
//Trigger Change event
|
|
55602
|
+
|
|
55603
|
+
this.builder.opts.onChange();
|
|
55512
55604
|
}); // Row Enlarge (Currently not used)
|
|
55513
55605
|
|
|
55514
55606
|
elms = cellSettings.querySelectorAll('.input-row-enlarge');
|
|
@@ -56506,7 +56598,140 @@ class ColumnTool {
|
|
|
56506
56598
|
|
|
56507
56599
|
if (posY) {
|
|
56508
56600
|
inpImageVertSlider.value = posY;
|
|
56509
|
-
}
|
|
56601
|
+
}
|
|
56602
|
+
|
|
56603
|
+
let overlayDimension = {
|
|
56604
|
+
width: elm.parentNode.offsetWidth,
|
|
56605
|
+
height: elm.parentNode.offsetHeight
|
|
56606
|
+
}; // console.log(overlayDimension);
|
|
56607
|
+
|
|
56608
|
+
let dimension, image;
|
|
56609
|
+
image = new Image();
|
|
56610
|
+
image.src = elm.style.backgroundImage.replace(/"/g, '').replace(/url\(|\)$/ig, '');
|
|
56611
|
+
|
|
56612
|
+
image.onload = () => {
|
|
56613
|
+
dimension = {
|
|
56614
|
+
width: image.naturalWidth,
|
|
56615
|
+
height: image.naturalHeight
|
|
56616
|
+
}; // console.log(dimension)
|
|
56617
|
+
|
|
56618
|
+
if (overlayDimension.width / overlayDimension.height <= dimension.width / dimension.height) {
|
|
56619
|
+
this.scaleWidth = true;
|
|
56620
|
+
this.scaleHeight = false; // let h = overlayDimension.height; //px
|
|
56621
|
+
|
|
56622
|
+
let w = overlayDimension.height * (dimension.width / dimension.height);
|
|
56623
|
+
w = w / overlayDimension.width * 100; //%
|
|
56624
|
+
|
|
56625
|
+
if (!elm.style.width) {
|
|
56626
|
+
elm.style.width = w + '%';
|
|
56627
|
+
elm.style.height = '';
|
|
56628
|
+
}
|
|
56629
|
+
|
|
56630
|
+
inpImageScaleSlider.min = w;
|
|
56631
|
+
} else {
|
|
56632
|
+
this.scaleHeight = true;
|
|
56633
|
+
this.scaleWidth = false; // let w = overlayDimension.width;
|
|
56634
|
+
|
|
56635
|
+
let h = overlayDimension.width * (dimension.height / dimension.width);
|
|
56636
|
+
h = h / overlayDimension.height * 100; //%
|
|
56637
|
+
|
|
56638
|
+
if (!elm.style.height) {
|
|
56639
|
+
elm.style.height = h + '%';
|
|
56640
|
+
elm.style.width = '';
|
|
56641
|
+
}
|
|
56642
|
+
|
|
56643
|
+
inpImageScaleSlider.min = h;
|
|
56644
|
+
}
|
|
56645
|
+
}; // const imageAdjust2 = this.imageAdjust2;
|
|
56646
|
+
// const inpImageScaleSlider = imageAdjust2.querySelector('.image-scale-slider');
|
|
56647
|
+
// const inpImageHorSlider = imageAdjust2.querySelector('.image-hor-slider');
|
|
56648
|
+
// const inpImageVertSlider = imageAdjust2.querySelector('.image-vert-slider');
|
|
56649
|
+
// inpImageScaleSlider.value = 100;
|
|
56650
|
+
// inpImageHorSlider.value = 0;
|
|
56651
|
+
// inpImageVertSlider.value = 0;
|
|
56652
|
+
// if(elm.style.backgroundSize) {
|
|
56653
|
+
// let val;
|
|
56654
|
+
// let bgSize = elm.style.backgroundSize;
|
|
56655
|
+
// if(isNaN(parseInt(bgSize))) {
|
|
56656
|
+
// val = 100;
|
|
56657
|
+
// } else {
|
|
56658
|
+
// val = parseInt(bgSize);
|
|
56659
|
+
// }
|
|
56660
|
+
// if(bgSize.indexOf('%')!==-1) {
|
|
56661
|
+
// inpImageScaleSlider.value = val;
|
|
56662
|
+
// }
|
|
56663
|
+
// }
|
|
56664
|
+
// if(elm.style.backgroundPositionX) {
|
|
56665
|
+
// let val;
|
|
56666
|
+
// let bgPosX = elm.style.backgroundPositionX;
|
|
56667
|
+
// if(isNaN(parseInt(bgPosX))) {
|
|
56668
|
+
// val = 0;
|
|
56669
|
+
// } else {
|
|
56670
|
+
// val = parseInt(bgPosX);
|
|
56671
|
+
// }
|
|
56672
|
+
// if(bgPosX.indexOf('%')!==-1) {
|
|
56673
|
+
// inpImageHorSlider.value = val;
|
|
56674
|
+
// }
|
|
56675
|
+
// }
|
|
56676
|
+
// if(elm.style.backgroundPositionY) {
|
|
56677
|
+
// let val;
|
|
56678
|
+
// let bgPosY = elm.style.backgroundPositionY;
|
|
56679
|
+
// if(isNaN(parseInt(bgPosY))) {
|
|
56680
|
+
// val = 0;
|
|
56681
|
+
// } else {
|
|
56682
|
+
// val = parseInt(bgPosY);
|
|
56683
|
+
// }
|
|
56684
|
+
// if(bgPosY.indexOf('%')!==-1) {
|
|
56685
|
+
// inpImageVertSlider.value = val;
|
|
56686
|
+
// }
|
|
56687
|
+
// }
|
|
56688
|
+
// let img = elm.querySelector('img');
|
|
56689
|
+
// if(!img) {
|
|
56690
|
+
// let oFitPosX = 0;
|
|
56691
|
+
// let oFitPosY = 0;
|
|
56692
|
+
// if(elm.style.backgroundPositionX) {
|
|
56693
|
+
// let val;
|
|
56694
|
+
// let bgPosX = elm.style.backgroundPositionX;
|
|
56695
|
+
// if(isNaN(parseInt(bgPosX))) {
|
|
56696
|
+
// val = 0;
|
|
56697
|
+
// } else {
|
|
56698
|
+
// val = parseInt(bgPosX);
|
|
56699
|
+
// }
|
|
56700
|
+
// if(bgPosX.indexOf('%')!==-1) {
|
|
56701
|
+
// inpImageHorSlider.value = val;
|
|
56702
|
+
// oFitPosX = val;
|
|
56703
|
+
// }
|
|
56704
|
+
// }
|
|
56705
|
+
// if(elm.style.backgroundPositionY) {
|
|
56706
|
+
// let val;
|
|
56707
|
+
// let bgPosY = elm.style.backgroundPositionY;
|
|
56708
|
+
// if(isNaN(parseInt(bgPosY))) {
|
|
56709
|
+
// val = 0;
|
|
56710
|
+
// } else {
|
|
56711
|
+
// val = parseInt(bgPosY);
|
|
56712
|
+
// }
|
|
56713
|
+
// if(bgPosY.indexOf('%')!==-1) {
|
|
56714
|
+
// inpImageVertSlider.value = val;
|
|
56715
|
+
// oFitPosY = val;
|
|
56716
|
+
// }
|
|
56717
|
+
// }
|
|
56718
|
+
// const src = elm.style.backgroundImage.replace(/"/g,"").replace(/url\(|\)$/ig, "");
|
|
56719
|
+
// elm.innerHTML = '';
|
|
56720
|
+
// img = document.createElement('img');
|
|
56721
|
+
// img.setAttribute('src', src);
|
|
56722
|
+
// elm.appendChild(img);
|
|
56723
|
+
// img.style.opacity = 0.0001;
|
|
56724
|
+
// img.style.width = '100%';
|
|
56725
|
+
// img.style.height = '100%';
|
|
56726
|
+
// img.style.objectFit = 'cover';
|
|
56727
|
+
// img.style.objectPosition = `${oFitPosX}% ${oFitPosY}%`
|
|
56728
|
+
// } else {
|
|
56729
|
+
// let x = img.style.objectPosition.split(' ')[0].replace('%','');
|
|
56730
|
+
// let y = img.style.objectPosition.split(' ')[1].replace('%','');
|
|
56731
|
+
// inpImageHorSlider.value = x;
|
|
56732
|
+
// inpImageVertSlider.value = y;
|
|
56733
|
+
// }
|
|
56734
|
+
//elementSelected
|
|
56510
56735
|
|
|
56511
56736
|
|
|
56512
56737
|
this.builder.elementSelected = elm; //Show modal
|
|
@@ -70175,7 +70400,18 @@ class ContentBuilder {
|
|
|
70175
70400
|
let builderStuff = this.util.builderStuff();
|
|
70176
70401
|
if (!builderStuff) return; // in case the builder is destroyed
|
|
70177
70402
|
|
|
70178
|
-
const htmlutil = new HtmlUtil(this);
|
|
70403
|
+
const htmlutil = new HtmlUtil(this); // Reset Zoom
|
|
70404
|
+
|
|
70405
|
+
if (this.opts.page !== '') {
|
|
70406
|
+
const wrapper = document.querySelector(this.opts.page);
|
|
70407
|
+
if (wrapper) wrapper.style.transform = '';
|
|
70408
|
+
} else {
|
|
70409
|
+
const builders = document.querySelectorAll(this.opts.container);
|
|
70410
|
+
builders.forEach(builder => {
|
|
70411
|
+
builder.style.transform = '';
|
|
70412
|
+
});
|
|
70413
|
+
}
|
|
70414
|
+
|
|
70179
70415
|
const builders = document.querySelectorAll(this.opts.container);
|
|
70180
70416
|
Array.prototype.forEach.call(builders, builder => {
|
|
70181
70417
|
builder.innerHTML = htmlutil.readHtml(builder, true);
|
|
@@ -70192,17 +70428,7 @@ class ContentBuilder {
|
|
|
70192
70428
|
});
|
|
70193
70429
|
this.moveable.destroy();
|
|
70194
70430
|
this.builderStuff.parentNode.removeChild(this.builderStuff);
|
|
70195
|
-
this.builderStuff = null;
|
|
70196
|
-
|
|
70197
|
-
if (this.opts.page !== '') {
|
|
70198
|
-
const wrapper = document.querySelector(this.opts.page);
|
|
70199
|
-
wrapper.style.transform = '';
|
|
70200
|
-
} else {
|
|
70201
|
-
const builders = document.querySelectorAll(this.opts.container);
|
|
70202
|
-
builders.forEach(builder => {
|
|
70203
|
-
builder.style.transform = '';
|
|
70204
|
-
});
|
|
70205
|
-
}
|
|
70431
|
+
this.builderStuff = null;
|
|
70206
70432
|
}
|
|
70207
70433
|
|
|
70208
70434
|
saveImages(handler, onComplete, onBase64Upload) {
|