@innovastudio/contentbox 1.4.29 → 1.4.30
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.
@@ -312,6 +312,79 @@ const prepareSvgIcons$1 = builder => {
|
|
312
312
|
<line x1="4" y1="20" x2="20" y2="20" />
|
313
313
|
</symbol>
|
314
314
|
|
315
|
+
<symbol id="icon-arrow-right" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
316
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
317
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
318
|
+
<line x1="15" y1="16" x2="19" y2="12"></line>
|
319
|
+
<line x1="15" y1="8" x2="19" y2="12"></line>
|
320
|
+
</symbol>
|
321
|
+
|
322
|
+
<symbol id="icon-arrow-left" viewBox="0 0 24 24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
323
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
324
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
325
|
+
<line x1="5" y1="12" x2="9" y2="16"></line>
|
326
|
+
<line x1="5" y1="12" x2="9" y2="8"></line>
|
327
|
+
</symbol>
|
328
|
+
|
329
|
+
<symbol id="icon-arrow-up" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
330
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
331
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
332
|
+
<line x1="16" y1="9" x2="12" y2="5"></line>
|
333
|
+
<line x1="8" y1="9" x2="12" y2="5"></line>
|
334
|
+
</symbol>
|
335
|
+
|
336
|
+
<symbol id="icon-arrow-down" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
337
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
338
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
339
|
+
<line x1="16" y1="15" x2="12" y2="19"></line>
|
340
|
+
<line x1="8" y1="15" x2="12" y2="19"></line>
|
341
|
+
</symbol>
|
342
|
+
|
343
|
+
<symbol id="icon-rotate-clockwise" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
344
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
345
|
+
<path d="M9 4.55a8 8 0 0 1 6 14.9m0 -4.45v5h5"></path>
|
346
|
+
<line x1="5.63" y1="7.16" x2="5.63" y2="7.17"></line>
|
347
|
+
<line x1="4.06" y1="11" x2="4.06" y2="11.01"></line>
|
348
|
+
<line x1="4.63" y1="15.1" x2="4.63" y2="15.11"></line>
|
349
|
+
<line x1="7.16" y1="18.37" x2="7.16" y2="18.38"></line>
|
350
|
+
<line x1="11" y1="19.94" x2="11" y2="19.95"></line>
|
351
|
+
</symbol>
|
352
|
+
|
353
|
+
<symbol id="icon-rotate-2" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
354
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
355
|
+
<path d="M15 4.55a8 8 0 0 0 -6 14.9m0 -4.45v5h-5"></path>
|
356
|
+
<line x1="18.37" y1="7.16" x2="18.37" y2="7.17"></line>
|
357
|
+
<line x1="13" y1="19.94" x2="13" y2="19.95"></line>
|
358
|
+
<line x1="16.84" y1="18.37" x2="16.84" y2="18.38"></line>
|
359
|
+
<line x1="19.37" y1="15.1" x2="19.37" y2="15.11"></line>
|
360
|
+
<line x1="19.94" y1="11" x2="19.94" y2="11.01"></line>
|
361
|
+
</symbol>
|
362
|
+
|
363
|
+
<symbol viewBox="0 0 24 24" id="icon-arrows-diagonal" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
364
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
365
|
+
<polyline points="16 4 20 4 20 8"></polyline>
|
366
|
+
<line x1="14" y1="10" x2="20" y2="4"></line>
|
367
|
+
<polyline points="8 20 4 20 4 16"></polyline>
|
368
|
+
<line x1="4" y1="20" x2="10" y2="14"></line>
|
369
|
+
</symbol>
|
370
|
+
|
371
|
+
<symbol viewBox="0 0 24 24" id="icon-arrows-diagonal-minimize" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
372
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
373
|
+
<path d="M18 10h-4v-4"></path>
|
374
|
+
<path d="M20 4l-6 6"></path>
|
375
|
+
<path d="M6 14h4v4"></path>
|
376
|
+
<path d="M10 14l-6 6"></path>
|
377
|
+
</symbol>
|
378
|
+
|
379
|
+
<symbol id="icon-circle-half" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
380
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
381
|
+
<circle cx="12" cy="12" r="9"></circle>
|
382
|
+
<path d="M12 3v18"></path>
|
383
|
+
<path d="M12 14l7 -7"></path>
|
384
|
+
<path d="M12 19l8.5 -8.5"></path>
|
385
|
+
<path d="M12 9l4.5 -4.5"></path>
|
386
|
+
</symbol>
|
387
|
+
|
315
388
|
</defs>
|
316
389
|
</svg>`;
|
317
390
|
const builderStuff = builder.builderStuff;
|
@@ -11700,11 +11773,13 @@ class EditBox {
|
|
11700
11773
|
const inpModuleCustomCode = builderStuff.querySelector('#txtBoxCustomCode');
|
11701
11774
|
hidModuleCustomCode.value = inpModuleCustomCode.value; //Save Html (original)
|
11702
11775
|
|
11703
|
-
activeModule.setAttribute('data-html', encodeURIComponent(hidModuleCustomCode.value));
|
11776
|
+
activeModule.setAttribute('data-html', encodeURIComponent(hidModuleCustomCode.value));
|
11777
|
+
let html = hidModuleCustomCode.value;
|
11778
|
+
html = html.replace(/{id}/g, dom$j.uniqueId()); //Render (programmatically)
|
11704
11779
|
|
11705
11780
|
let range = document.createRange();
|
11706
11781
|
activeModule.innerHTML = '';
|
11707
|
-
activeModule.appendChild(range.createContextualFragment(
|
11782
|
+
activeModule.appendChild(range.createContextualFragment(html)); // We use createContextualFragment so that embedded javascript code (code block) will be executed
|
11708
11783
|
//Trigger Render event
|
11709
11784
|
|
11710
11785
|
this.builder.settings.onRender(); //Trigger Change event
|
@@ -12051,6 +12126,26 @@ class EditBox {
|
|
12051
12126
|
dom$j.removeClass(activeBox, 'box-active');
|
12052
12127
|
this.builder.showTools();
|
12053
12128
|
});
|
12129
|
+
/*
|
12130
|
+
// Experimental
|
12131
|
+
modalEditBox.style.display = 'flex';
|
12132
|
+
document.body.classList.add('side-open');
|
12133
|
+
let panel = modalEditBox.querySelector('.is-modal-content');
|
12134
|
+
setTimeout(()=>{
|
12135
|
+
this.builder.showModal(modalEditBox, false, ()=>{
|
12136
|
+
dom.removeClass(activeBox, 'box-active');
|
12137
|
+
|
12138
|
+
this.builder.showTools();
|
12139
|
+
document.body.classList.remove('side-open');
|
12140
|
+
this.builder.wrapperEl.style.transition = 'none';
|
12141
|
+
setTimeout(()=>{
|
12142
|
+
modalEditBox.style.display = '';
|
12143
|
+
this.builder.wrapperEl.style.transition = '';
|
12144
|
+
}, 200);
|
12145
|
+
});
|
12146
|
+
}, 10);
|
12147
|
+
*/
|
12148
|
+
|
12054
12149
|
modalEditBox.focus();
|
12055
12150
|
|
12056
12151
|
if (container) {
|
@@ -17663,7 +17758,7 @@ class Util {
|
|
17663
17758
|
|
17664
17759
|
const cellCount = row.childElementCount - num;
|
17665
17760
|
const rowClass = this.builder.opts.row;
|
17666
|
-
|
17761
|
+
let colClass = this.builder.opts.cols;
|
17667
17762
|
const colEqual = this.builder.opts.colequal;
|
17668
17763
|
|
17669
17764
|
if (colEqual.length > 0) {
|
@@ -17704,7 +17799,21 @@ class Util {
|
|
17704
17799
|
let n = 0;
|
17705
17800
|
const cols = dom.elementChildren(row);
|
17706
17801
|
cols.forEach(col => {
|
17707
|
-
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-col-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return;
|
17802
|
+
if (dom.hasClass(col, 'is-row-tool') || dom.hasClass(col, 'is-col-tool') || dom.hasClass(col, 'is-rowadd-tool') || dom.hasClass(col, 'is-row-overlay')) return; // Bootstrap stuff
|
17803
|
+
|
17804
|
+
col.classList.forEach(item => {
|
17805
|
+
if (item.indexOf('col-md-') !== -1) ; else if (item.indexOf('col-sm-') !== -1) {
|
17806
|
+
colClass = ['col-sm-1', 'col-sm-2', 'col-sm-3', 'col-sm-4', 'col-sm-5', 'col-sm-6', 'col-sm-7', 'col-sm-8', 'col-sm-9', 'col-sm-10', 'col-sm-11', 'col-sm-12'];
|
17807
|
+
} else if (item.indexOf('col-xs-') !== -1) {
|
17808
|
+
colClass = ['col-xs-1', 'col-xs-2', 'col-xs-3', 'col-xs-4', 'col-xs-5', 'col-xs-6', 'col-xs-7', 'col-xs-8', 'col-xs-9', 'col-xs-10', 'col-xs-11', 'col-xs-12'];
|
17809
|
+
} else if (item.indexOf('col-lg-') !== -1) {
|
17810
|
+
colClass = ['col-lg-1', 'col-lg-2', 'col-lg-3', 'col-lg-4', 'col-lg-5', 'col-lg-6', 'col-lg-7', 'col-lg-8', 'col-lg-9', 'col-lg-10', 'col-lg-11', 'col-lg-12'];
|
17811
|
+
} else if (item.indexOf('col-xl-') !== -1) {
|
17812
|
+
colClass = ['col-xl-1', 'col-xl-2', 'col-xl-3', 'col-xl-4', 'col-xl-5', 'col-xl-6', 'col-xl-7', 'col-xl-8', 'col-xl-9', 'col-xl-10', 'col-xl-11', 'col-xl-12'];
|
17813
|
+
} else if (item.indexOf('col-xxl-') !== -1) {
|
17814
|
+
colClass = ['col-xxl-1', 'col-xxl-2', 'col-xxl-3', 'col-xxl-4', 'col-xxl-5', 'col-xxl-6', 'col-xxl-7', 'col-xxl-8', 'col-xxl-9', 'col-xxl-10', 'col-xxl-11', 'col-xxl-12'];
|
17815
|
+
}
|
17816
|
+
});
|
17708
17817
|
n++;
|
17709
17818
|
|
17710
17819
|
for (var i = 0; i <= colClass.length - 1; i++) {
|
@@ -17714,7 +17823,10 @@ class Util {
|
|
17714
17823
|
if (cellCount === 1) dom.addClass(col, colClass[11]);
|
17715
17824
|
if (cellCount === 2) dom.addClass(col, colClass[5]);
|
17716
17825
|
if (cellCount === 3) dom.addClass(col, colClass[3]);
|
17717
|
-
|
17826
|
+
|
17827
|
+
if (cellCount === 4) {
|
17828
|
+
dom.addClass(col, colClass[2]);
|
17829
|
+
}
|
17718
17830
|
|
17719
17831
|
if (cellCount === 5) {
|
17720
17832
|
// 2, 2, 2, 2, 4
|
@@ -28492,7 +28604,11 @@ class HtmlUtil {
|
|
28492
28604
|
if (elm) builderStuff.removeChild(elm); // return html;
|
28493
28605
|
|
28494
28606
|
let beautify = JsBeautify.html;
|
28495
|
-
|
28607
|
+
html = beautify(html); // https://stackoverflow.com/questions/22962220/remove-multiple-line-breaks-n-in-javascript
|
28608
|
+
// html = html.replace(/(\r\n|\r|\n){2}/g, '$1').replace(/(\r\n|\r|\n){3,}/g, '$1\n')
|
28609
|
+
|
28610
|
+
html = html.replace(/(\r\n|\r|\n){3,}/g, '$1\n');
|
28611
|
+
return html;
|
28496
28612
|
}
|
28497
28613
|
|
28498
28614
|
}
|
@@ -30840,7 +30956,7 @@ class Grid {
|
|
30840
30956
|
}
|
30841
30957
|
|
30842
30958
|
const rowClass = builder.opts.row;
|
30843
|
-
|
30959
|
+
let colClass = builder.opts.cols;
|
30844
30960
|
const colSizes = builder.opts.colsizes;
|
30845
30961
|
|
30846
30962
|
if (rowClass !== '' && colClass.length > 0 && colSizes.length > 0) {
|
@@ -30893,6 +31009,21 @@ class Grid {
|
|
30893
31009
|
|
30894
31010
|
|
30895
31011
|
if (rowClass !== '' && colClass.length > 0) {
|
31012
|
+
// Bootstrap stuff
|
31013
|
+
cell.classList.forEach(item => {
|
31014
|
+
if (item.indexOf('col-md-') !== -1) ; else if (item.indexOf('col-sm-') !== -1) {
|
31015
|
+
colClass = ['col-sm-1', 'col-sm-2', 'col-sm-3', 'col-sm-4', 'col-sm-5', 'col-sm-6', 'col-sm-7', 'col-sm-8', 'col-sm-9', 'col-sm-10', 'col-sm-11', 'col-sm-12'];
|
31016
|
+
} else if (item.indexOf('col-xs-') !== -1) {
|
31017
|
+
colClass = ['col-xs-1', 'col-xs-2', 'col-xs-3', 'col-xs-4', 'col-xs-5', 'col-xs-6', 'col-xs-7', 'col-xs-8', 'col-xs-9', 'col-xs-10', 'col-xs-11', 'col-xs-12'];
|
31018
|
+
} else if (item.indexOf('col-lg-') !== -1) {
|
31019
|
+
colClass = ['col-lg-1', 'col-lg-2', 'col-lg-3', 'col-lg-4', 'col-lg-5', 'col-lg-6', 'col-lg-7', 'col-lg-8', 'col-lg-9', 'col-lg-10', 'col-lg-11', 'col-lg-12'];
|
31020
|
+
} else if (item.indexOf('col-xl-') !== -1) {
|
31021
|
+
colClass = ['col-xl-1', 'col-xl-2', 'col-xl-3', 'col-xl-4', 'col-xl-5', 'col-xl-6', 'col-xl-7', 'col-xl-8', 'col-xl-9', 'col-xl-10', 'col-xl-11', 'col-xl-12'];
|
31022
|
+
} else if (item.indexOf('col-xxl-') !== -1) {
|
31023
|
+
colClass = ['col-xxl-1', 'col-xxl-2', 'col-xxl-3', 'col-xxl-4', 'col-xxl-5', 'col-xxl-6', 'col-xxl-7', 'col-xxl-8', 'col-xxl-9', 'col-xxl-10', 'col-xxl-11', 'col-xxl-12'];
|
31024
|
+
}
|
31025
|
+
});
|
31026
|
+
|
30896
31027
|
if (!dom.hasClass(cell, colClass[11])) {
|
30897
31028
|
//if not column full
|
30898
31029
|
if (dom.hasClass(cell, colClass[11])) {
|
@@ -30999,7 +31130,7 @@ class Grid {
|
|
30999
31130
|
}
|
31000
31131
|
|
31001
31132
|
const rowClass = builder.opts.row;
|
31002
|
-
|
31133
|
+
let colClass = builder.opts.cols;
|
31003
31134
|
const colSizes = builder.opts.colsizes;
|
31004
31135
|
|
31005
31136
|
if (rowClass !== '' && colClass.length > 0 && colSizes.length > 0) {
|
@@ -31054,6 +31185,21 @@ class Grid {
|
|
31054
31185
|
|
31055
31186
|
|
31056
31187
|
if (rowClass !== '' && colClass.length > 0) {
|
31188
|
+
// Bootstrap stuff
|
31189
|
+
cell.classList.forEach(item => {
|
31190
|
+
if (item.indexOf('col-md-') !== -1) ; else if (item.indexOf('col-sm-') !== -1) {
|
31191
|
+
colClass = ['col-sm-1', 'col-sm-2', 'col-sm-3', 'col-sm-4', 'col-sm-5', 'col-sm-6', 'col-sm-7', 'col-sm-8', 'col-sm-9', 'col-sm-10', 'col-sm-11', 'col-sm-12'];
|
31192
|
+
} else if (item.indexOf('col-xs-') !== -1) {
|
31193
|
+
colClass = ['col-xs-1', 'col-xs-2', 'col-xs-3', 'col-xs-4', 'col-xs-5', 'col-xs-6', 'col-xs-7', 'col-xs-8', 'col-xs-9', 'col-xs-10', 'col-xs-11', 'col-xs-12'];
|
31194
|
+
} else if (item.indexOf('col-lg-') !== -1) {
|
31195
|
+
colClass = ['col-lg-1', 'col-lg-2', 'col-lg-3', 'col-lg-4', 'col-lg-5', 'col-lg-6', 'col-lg-7', 'col-lg-8', 'col-lg-9', 'col-lg-10', 'col-lg-11', 'col-lg-12'];
|
31196
|
+
} else if (item.indexOf('col-xl-') !== -1) {
|
31197
|
+
colClass = ['col-xl-1', 'col-xl-2', 'col-xl-3', 'col-xl-4', 'col-xl-5', 'col-xl-6', 'col-xl-7', 'col-xl-8', 'col-xl-9', 'col-xl-10', 'col-xl-11', 'col-xl-12'];
|
31198
|
+
} else if (item.indexOf('col-xxl-') !== -1) {
|
31199
|
+
colClass = ['col-xxl-1', 'col-xxl-2', 'col-xxl-3', 'col-xxl-4', 'col-xxl-5', 'col-xxl-6', 'col-xxl-7', 'col-xxl-8', 'col-xxl-9', 'col-xxl-10', 'col-xxl-11', 'col-xxl-12'];
|
31200
|
+
}
|
31201
|
+
});
|
31202
|
+
|
31057
31203
|
if (!dom.hasClass(cell, colClass[11])) {
|
31058
31204
|
//if not column full
|
31059
31205
|
if (dom.hasClass(cell, colClass[0])) {
|
@@ -84223,7 +84369,7 @@ class SaveImages {
|
|
84223
84369
|
|
84224
84370
|
}
|
84225
84371
|
|
84226
|
-
const dom$1 = new Dom();
|
84372
|
+
const dom$1$1 = new Dom();
|
84227
84373
|
|
84228
84374
|
class Tooltip {
|
84229
84375
|
constructor(builder) {
|
@@ -84236,7 +84382,7 @@ class Tooltip {
|
|
84236
84382
|
|
84237
84383
|
if (!tooltip) {
|
84238
84384
|
let html = '<div class="is-tooltip"></div>';
|
84239
|
-
dom$1.appendHtml(builderStuff, html);
|
84385
|
+
dom$1$1.appendHtml(builderStuff, html);
|
84240
84386
|
tooltip = builderStuff.querySelector('.is-tooltip');
|
84241
84387
|
}
|
84242
84388
|
|
@@ -92345,6 +92491,794 @@ class ContentStuff {
|
|
92345
92491
|
|
92346
92492
|
}
|
92347
92493
|
|
92494
|
+
// Experimental
|
92495
|
+
const dom$1 = new Dom$1();
|
92496
|
+
|
92497
|
+
class AnimateScroll {
|
92498
|
+
constructor(builder) {
|
92499
|
+
this.builder = builder;
|
92500
|
+
const builderStuff = this.builder.builderStuff;
|
92501
|
+
this.builderStuff = builderStuff;
|
92502
|
+
let html = `
|
92503
|
+
<style>
|
92504
|
+
.animatescroll.active {
|
92505
|
+
right: 0;
|
92506
|
+
}
|
92507
|
+
.animatescroll .side-title {
|
92508
|
+
font-weight: 400;
|
92509
|
+
padding: 18px !important;
|
92510
|
+
font-size: 15px;
|
92511
|
+
opacity: 0.8;
|
92512
|
+
}
|
92513
|
+
.anim-controls {
|
92514
|
+
padding: 0 !important;
|
92515
|
+
z-index: 1;
|
92516
|
+
height: 100%;
|
92517
|
+
position: absolute;
|
92518
|
+
top: 0;
|
92519
|
+
box-sizing: border-box;
|
92520
|
+
border-top: transparent 60px solid !important;
|
92521
|
+
}
|
92522
|
+
#divAnimAdjust, #divAnimSettings {
|
92523
|
+
border-top: transparent 65px solid !important;
|
92524
|
+
padding: 0 10px 20px 18px !important;
|
92525
|
+
height: 100%;
|
92526
|
+
box-sizing: border-box;
|
92527
|
+
overflow-y: auto;
|
92528
|
+
overflow-x: hidden;
|
92529
|
+
position: absolute;
|
92530
|
+
top: 0; left: 0;
|
92531
|
+
}
|
92532
|
+
.anim-label {
|
92533
|
+
padding: 15px 0 5px;
|
92534
|
+
width: 100%;
|
92535
|
+
flex:none;
|
92536
|
+
display: flex;
|
92537
|
+
justify-content: space-between;
|
92538
|
+
}
|
92539
|
+
.bold {
|
92540
|
+
font-weight: 600;
|
92541
|
+
}
|
92542
|
+
.anim-controls button,
|
92543
|
+
.anim-list button {
|
92544
|
+
height: 35px !important;
|
92545
|
+
outline-offset: -2px !important;
|
92546
|
+
}
|
92547
|
+
|
92548
|
+
.anim-controls input[type=text],
|
92549
|
+
.anim-list input[type=text] {
|
92550
|
+
font-size: 13px !important;
|
92551
|
+
font-family: sans-serif !important;
|
92552
|
+
font-weight: 300 !important;
|
92553
|
+
padding: 0 !important;
|
92554
|
+
}
|
92555
|
+
.flex-wrap {
|
92556
|
+
display: flex;
|
92557
|
+
flex-flow: wrap;
|
92558
|
+
}
|
92559
|
+
|
92560
|
+
.inp-slide-left,
|
92561
|
+
.inp-slide-right,
|
92562
|
+
.inp-slide-up,
|
92563
|
+
.inp-slide-down,
|
92564
|
+
.inp-scale,
|
92565
|
+
.inp-rotate-clockwise,
|
92566
|
+
.inp-rotate-counter {
|
92567
|
+
width:65px !important;
|
92568
|
+
height:35px !important;
|
92569
|
+
text-align:center !important;
|
92570
|
+
margin-left:10px !important;
|
92571
|
+
font-size: 13px !important;
|
92572
|
+
font-family: sans-serif !important;
|
92573
|
+
font-weight: 300 !important;
|
92574
|
+
padding: 0 !important;
|
92575
|
+
}
|
92576
|
+
</style>
|
92577
|
+
<div class="is-side animatescroll" style="display: block;" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
92578
|
+
|
92579
|
+
<div class="side-title">${out('Scroll Animation')}</div>
|
92580
|
+
|
92581
|
+
<button tabindex="-1" title="Close" class="is-side-close" style="z-index:2;background:transparent;width:25px;height:25px;position:absolute;top:10px;right:13px;box-sizing:border-box;padding:0;line-height:25px;font-size: 12px;text-align:center;cursor:pointer;"><svg class="is-icon-flex" style="width:25px;height:25px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
|
92582
|
+
|
92583
|
+
<div class="anim-controls">
|
92584
|
+
|
92585
|
+
<div class="is-tabs clearfix" style="padding-top:18px;position:relative;z-index:1;" data-group="skrollanim">
|
92586
|
+
<a id="tabBoxGeneral" href="" data-content="divAnimAdjust" class="active">Animation</a>
|
92587
|
+
<a id="tabBoxContentContainer" href="" data-content="divAnimSettings">Settings</a>
|
92588
|
+
</div>
|
92589
|
+
|
92590
|
+
<div id="divAnimAdjust" class="is-tab-content active" data-group="skrollanim" style="display:flex;padding-top:0">
|
92591
|
+
|
92592
|
+
<div class="anim-label">${out('Target')}:</div>
|
92593
|
+
<div class="flex-wrap">
|
92594
|
+
<button title="" class="cmd-target on" data-command="target" data-value="element" style="width:80px">Element</button>
|
92595
|
+
<button title="" class="cmd-target" data-command="target" data-value="column" style="width:80px">Column</button>
|
92596
|
+
<button title="" class="cmd-target" data-command="target" data-value="row" style="width:80px">Row</button>
|
92597
|
+
<button title="" class="cmd-target" data-command="target" data-value="container" style="width:80px">Container</button>
|
92598
|
+
</div>
|
92599
|
+
|
92600
|
+
<div class="anim-label">
|
92601
|
+
<span><span class="bold">Slide Left</span>: <input class="inp-slide-left" type="text" /></span>
|
92602
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-arrow-left"></use></svg>
|
92603
|
+
</div>
|
92604
|
+
<div class="flex-wrap">
|
92605
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="75px" style="width:60px">75</button>
|
92606
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="100px" style="width:60px">100</button>
|
92607
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="125px" style="width:60px">125</button>
|
92608
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="150px" style="width:60px">150</button>
|
92609
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="200px" style="width:60px">200</button>
|
92610
|
+
</div>
|
92611
|
+
<div class="anim-label">
|
92612
|
+
<span><span class="bold">Slide Right</span>: <input class="inp-slide-right" type="text" /></span>
|
92613
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-arrow-right"></use></svg>
|
92614
|
+
</div>
|
92615
|
+
<div class="flex-wrap">
|
92616
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="-75px" style="width:60px">75</button>
|
92617
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="-100px" style="width:60px">100</button>
|
92618
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="-125px" style="width:60px">125</button>
|
92619
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="-150px" style="width:60px">150</button>
|
92620
|
+
<button title="" class="cmd-slidex" data-command="slidex" data-value="-200px" style="width:60px">200</button>
|
92621
|
+
</div>
|
92622
|
+
|
92623
|
+
<div class="anim-label">
|
92624
|
+
<span><span class="bold">Slide Up</span>: <input class="inp-slide-up" type="text" /></span>
|
92625
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-arrow-up"></use></svg>
|
92626
|
+
</div>
|
92627
|
+
<div class="flex-wrap">
|
92628
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="75px" style="width:60px">75</button>
|
92629
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="100px" style="width:60px">100</button>
|
92630
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="125px" style="width:60px">125</button>
|
92631
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="150px" style="width:60px">150</button>
|
92632
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="200px" style="width:60px">200</button>
|
92633
|
+
</div>
|
92634
|
+
<div class="anim-label">
|
92635
|
+
<span><span class="bold">Slide Down</span>: <input class="inp-slide-down" type="text" /></span>
|
92636
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-arrow-down"></use></svg>
|
92637
|
+
</div>
|
92638
|
+
<div class="flex-wrap">
|
92639
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="-75px" style="width:60px">75</button>
|
92640
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="-100px" style="width:60px">100</button>
|
92641
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="-125px" style="width:60px">125</button>
|
92642
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="-150px" style="width:60px">150</button>
|
92643
|
+
<button title="" class="cmd-slidey" data-command="slidey" data-value="-200px" style="width:60px">200</button>
|
92644
|
+
</div>
|
92645
|
+
|
92646
|
+
<div class="anim-label">
|
92647
|
+
<span><span class="bold">Scale</span>: <input class="inp-scale" type="text" /></span>
|
92648
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-arrows-diagonal"></use></svg>
|
92649
|
+
</div>
|
92650
|
+
<div class="flex-wrap">
|
92651
|
+
<button title="" class="cmd-scale" data-command="scale" data-value="0.8" style="width:60px">0.8</button>
|
92652
|
+
<button title="" class="cmd-scale" data-command="scale" data-value="0.9" style="width:60px">0.9</button>
|
92653
|
+
<button title="" class="cmd-scale" data-command="scale" data-value="1.1" style="width:60px">1.1</button>
|
92654
|
+
<button title="" class="cmd-scale" data-command="scale" data-value="1.2" style="width:60px">1.2</button>
|
92655
|
+
<button title="" class="cmd-scale" data-command="scale" data-value="2" style="width:60px">2</button>
|
92656
|
+
</div>
|
92657
|
+
|
92658
|
+
<div class="anim-label">
|
92659
|
+
<span><span class="bold">Rotate Clockwise</span>: <input class="inp-rotate-clockwise" type="text" /></span> </span>
|
92660
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-rotate-clockwise"></use></svg>
|
92661
|
+
</div>
|
92662
|
+
<div class="flex-wrap">
|
92663
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="-10" style="width:60px">10°</button>
|
92664
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="-20" style="width:60px">20°</button>
|
92665
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="-30" style="width:60px">30°</button>
|
92666
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="-60" style="width:60px">60°</button>
|
92667
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="-90" style="width:60px">90°</button>
|
92668
|
+
</div>
|
92669
|
+
<div class="anim-label">
|
92670
|
+
<span><span class="bold">Rotate Counterclockwise</span>: <input class="inp-rotate-counter" type="text" /></span> </span>
|
92671
|
+
<svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-rotate-2"></use></svg>
|
92672
|
+
</div>
|
92673
|
+
<div class="flex-wrap">
|
92674
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="10" style="width:60px">10°</button>
|
92675
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="20" style="width:60px">20°</button>
|
92676
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="30" style="width:60px">30°</button>
|
92677
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="60" style="width:60px">60°</button>
|
92678
|
+
<button title="" class="cmd-rotate" data-command="rotate" data-value="90" style="width:60px">90°</button>
|
92679
|
+
</div>
|
92680
|
+
<div class="anim-label"><span class="bold">Fade</span> <svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-circle-half"></use></svg></div>
|
92681
|
+
<button title="" class="cmd-fade" data-command="fade" data-value="in" style="width:125px">Fade In</button>
|
92682
|
+
<br>
|
92683
|
+
<button title="" class="cmd-clear-scrollanim" style="width:195px">
|
92684
|
+
<svg class="is-icon-flex" style="width:10px;height:10px;"><use xlink:href="#icon-clean"></use></svg>
|
92685
|
+
<span style="margin-left:7px">Clear Animation</span></button>
|
92686
|
+
</div>
|
92687
|
+
|
92688
|
+
<div id="divAnimSettings" class="is-tab-content" data-group="skrollanim" style="padding-top:0">
|
92689
|
+
|
92690
|
+
<div class="anim-label">${out('Start')}:</div>
|
92691
|
+
<div class="flex-wrap">
|
92692
|
+
<button title="" class="cmd-start on" data-command="start" data-value="data-bottom-top" style="width:80px">Normal</button>
|
92693
|
+
<button title="" class="cmd-start" data-command="start" data-value="data-400-bottom" style="width:80px">Delayed</button>
|
92694
|
+
<button title="" class="cmd-start" data-command="start" data-value="data-200-bottom" style="width:80px">Late</button>
|
92695
|
+
<button title="" class="cmd-start" data-command="start" data-value="data--50-bottom" style="width:95px">Very Late</button>
|
92696
|
+
</div>
|
92697
|
+
|
92698
|
+
<div class="anim-label">${out('End')}:</div>
|
92699
|
+
<div class="flex-wrap">
|
92700
|
+
<button title="" class="cmd-end" data-command="end" data-value="data-bottom" style="width:95px">Very Soon</button>
|
92701
|
+
<button title="" class="cmd-end" data-command="end" data-value="data-center-top" style="width:80px">Soon</button>
|
92702
|
+
<button title="" class="cmd-end on" data-command="end" data-value="data-center" style="width:80px">Normal</button>
|
92703
|
+
<!--<button title="" class="cmd-end" data-command="end" data-value="data-top-bottom" style="width:80px">Late</button>-->
|
92704
|
+
</div>
|
92705
|
+
|
92706
|
+
|
92707
|
+
</div>
|
92708
|
+
|
92709
|
+
|
92710
|
+
</div>
|
92711
|
+
|
92712
|
+
<div class="dummy-elm"></div>
|
92713
|
+
|
92714
|
+
</div>
|
92715
|
+
`;
|
92716
|
+
dom$1.appendHtml(builderStuff, html);
|
92717
|
+
let modalAnimateScroll = builderStuff.querySelector('.is-side.animatescroll');
|
92718
|
+
this.modalAnimateScroll = modalAnimateScroll;
|
92719
|
+
const btnClose = modalAnimateScroll.querySelector('.is-side-close');
|
92720
|
+
btnClose.addEventListener('click', () => {
|
92721
|
+
this.close();
|
92722
|
+
}); // Target
|
92723
|
+
|
92724
|
+
let btns = modalAnimateScroll.querySelectorAll('.cmd-target');
|
92725
|
+
btns.forEach(btn => {
|
92726
|
+
btn.addEventListener('click', () => {
|
92727
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-target');
|
92728
|
+
elms.forEach(elm => {
|
92729
|
+
elm.classList.remove('on');
|
92730
|
+
});
|
92731
|
+
btn.classList.add('on');
|
92732
|
+
this.read();
|
92733
|
+
});
|
92734
|
+
}); // Start
|
92735
|
+
|
92736
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-start');
|
92737
|
+
btns.forEach(btn => {
|
92738
|
+
btn.addEventListener('click', () => {
|
92739
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-start');
|
92740
|
+
elms.forEach(elm => {
|
92741
|
+
elm.classList.remove('on');
|
92742
|
+
});
|
92743
|
+
btn.classList.add('on');
|
92744
|
+
this.apply();
|
92745
|
+
});
|
92746
|
+
}); // End
|
92747
|
+
|
92748
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-end');
|
92749
|
+
btns.forEach(btn => {
|
92750
|
+
btn.addEventListener('click', () => {
|
92751
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-end');
|
92752
|
+
elms.forEach(elm => {
|
92753
|
+
elm.classList.remove('on');
|
92754
|
+
});
|
92755
|
+
btn.classList.add('on');
|
92756
|
+
this.apply();
|
92757
|
+
});
|
92758
|
+
}); // Slide X
|
92759
|
+
|
92760
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
92761
|
+
btns.forEach(btn => {
|
92762
|
+
btn.addEventListener('click', () => {
|
92763
|
+
const inpSlideLeft = modalAnimateScroll.querySelector('.inp-slide-right');
|
92764
|
+
const inpSlideRight = modalAnimateScroll.querySelector('.inp-slide-left');
|
92765
|
+
|
92766
|
+
if (btn.classList.contains('on')) {
|
92767
|
+
btn.classList.remove('on');
|
92768
|
+
inpSlideLeft.value = '';
|
92769
|
+
inpSlideRight.value = '';
|
92770
|
+
this.apply();
|
92771
|
+
return;
|
92772
|
+
}
|
92773
|
+
|
92774
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
92775
|
+
elms.forEach(elm => {
|
92776
|
+
elm.classList.remove('on');
|
92777
|
+
});
|
92778
|
+
btn.classList.add('on');
|
92779
|
+
|
92780
|
+
if (btn.getAttribute('data-value').indexOf('-') !== -1) {
|
92781
|
+
inpSlideLeft.value = btn.getAttribute('data-value').replace('-', '');
|
92782
|
+
inpSlideRight.value = '';
|
92783
|
+
} else {
|
92784
|
+
inpSlideRight.value = btn.getAttribute('data-value');
|
92785
|
+
inpSlideLeft.value = '';
|
92786
|
+
}
|
92787
|
+
|
92788
|
+
this.apply();
|
92789
|
+
});
|
92790
|
+
});
|
92791
|
+
const inpSlideLeft = modalAnimateScroll.querySelector('.inp-slide-right');
|
92792
|
+
const inpSlideRight = modalAnimateScroll.querySelector('.inp-slide-left');
|
92793
|
+
inpSlideLeft.addEventListener('change', () => {
|
92794
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
92795
|
+
elms.forEach(elm => {
|
92796
|
+
elm.classList.remove('on');
|
92797
|
+
});
|
92798
|
+
inpSlideRight.value = '';
|
92799
|
+
this.apply();
|
92800
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-slidex[data-value="-${inpSlideLeft.value}"]`);
|
92801
|
+
if (btn) btn.classList.add('on');
|
92802
|
+
});
|
92803
|
+
inpSlideRight.addEventListener('change', () => {
|
92804
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
92805
|
+
elms.forEach(elm => {
|
92806
|
+
elm.classList.remove('on');
|
92807
|
+
});
|
92808
|
+
inpSlideLeft.value = '';
|
92809
|
+
this.apply();
|
92810
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-slidex[data-value="${inpSlideRight.value}"]`);
|
92811
|
+
if (btn) btn.classList.add('on');
|
92812
|
+
}); // Slide Y
|
92813
|
+
|
92814
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
92815
|
+
btns.forEach(btn => {
|
92816
|
+
btn.addEventListener('click', () => {
|
92817
|
+
const inpSlideUp = modalAnimateScroll.querySelector('.inp-slide-up');
|
92818
|
+
const inpSlideDown = modalAnimateScroll.querySelector('.inp-slide-down');
|
92819
|
+
|
92820
|
+
if (btn.classList.contains('on')) {
|
92821
|
+
btn.classList.remove('on');
|
92822
|
+
inpSlideUp.value = '';
|
92823
|
+
inpSlideDown.value = '';
|
92824
|
+
this.apply();
|
92825
|
+
return;
|
92826
|
+
}
|
92827
|
+
|
92828
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
92829
|
+
elms.forEach(elm => {
|
92830
|
+
elm.classList.remove('on');
|
92831
|
+
});
|
92832
|
+
btn.classList.add('on');
|
92833
|
+
|
92834
|
+
if (btn.getAttribute('data-value').indexOf('-') !== -1) {
|
92835
|
+
inpSlideDown.value = btn.getAttribute('data-value').replace('-', '');
|
92836
|
+
inpSlideUp.value = '';
|
92837
|
+
} else {
|
92838
|
+
inpSlideUp.value = btn.getAttribute('data-value');
|
92839
|
+
inpSlideDown.value = '';
|
92840
|
+
}
|
92841
|
+
|
92842
|
+
this.apply();
|
92843
|
+
});
|
92844
|
+
});
|
92845
|
+
const inpSlideUp = modalAnimateScroll.querySelector('.inp-slide-up');
|
92846
|
+
const inpSlideDown = modalAnimateScroll.querySelector('.inp-slide-down');
|
92847
|
+
inpSlideDown.addEventListener('change', () => {
|
92848
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
92849
|
+
elms.forEach(elm => {
|
92850
|
+
elm.classList.remove('on');
|
92851
|
+
});
|
92852
|
+
inpSlideUp.value = '';
|
92853
|
+
this.apply();
|
92854
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-slidey[data-value="-${inpSlideDown.value}"]`);
|
92855
|
+
if (btn) btn.classList.add('on');
|
92856
|
+
});
|
92857
|
+
inpSlideUp.addEventListener('change', () => {
|
92858
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
92859
|
+
elms.forEach(elm => {
|
92860
|
+
elm.classList.remove('on');
|
92861
|
+
});
|
92862
|
+
inpSlideDown.value = '';
|
92863
|
+
this.apply();
|
92864
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-slidey[data-value="${inpSlideUp.value}"]`);
|
92865
|
+
if (btn) btn.classList.add('on');
|
92866
|
+
}); // Scale
|
92867
|
+
|
92868
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-scale');
|
92869
|
+
btns.forEach(btn => {
|
92870
|
+
btn.addEventListener('click', () => {
|
92871
|
+
const inpScale = modalAnimateScroll.querySelector('.inp-scale');
|
92872
|
+
|
92873
|
+
if (btn.classList.contains('on')) {
|
92874
|
+
btn.classList.remove('on');
|
92875
|
+
inpScale.value = '';
|
92876
|
+
this.apply();
|
92877
|
+
return;
|
92878
|
+
}
|
92879
|
+
|
92880
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-scale');
|
92881
|
+
elms.forEach(elm => {
|
92882
|
+
elm.classList.remove('on');
|
92883
|
+
});
|
92884
|
+
btn.classList.add('on');
|
92885
|
+
inpScale.value = btn.getAttribute('data-value');
|
92886
|
+
this.apply();
|
92887
|
+
});
|
92888
|
+
});
|
92889
|
+
const inpScale = modalAnimateScroll.querySelector('.inp-scale');
|
92890
|
+
inpScale.addEventListener('change', () => {
|
92891
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-scale');
|
92892
|
+
elms.forEach(elm => {
|
92893
|
+
elm.classList.remove('on');
|
92894
|
+
});
|
92895
|
+
this.apply();
|
92896
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-scale[data-value="${inpScale.value}"]`);
|
92897
|
+
if (btn) btn.classList.add('on');
|
92898
|
+
}); // Rotate
|
92899
|
+
|
92900
|
+
btns = modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
92901
|
+
btns.forEach(btn => {
|
92902
|
+
btn.addEventListener('click', () => {
|
92903
|
+
const inpRotateClockwise = modalAnimateScroll.querySelector('.inp-rotate-clockwise');
|
92904
|
+
const inpRotateCounter = modalAnimateScroll.querySelector('.inp-rotate-counter');
|
92905
|
+
|
92906
|
+
if (btn.classList.contains('on')) {
|
92907
|
+
btn.classList.remove('on');
|
92908
|
+
inpRotateClockwise.value = '';
|
92909
|
+
inpRotateCounter.value = '';
|
92910
|
+
this.apply();
|
92911
|
+
return;
|
92912
|
+
}
|
92913
|
+
|
92914
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
92915
|
+
elms.forEach(elm => {
|
92916
|
+
elm.classList.remove('on');
|
92917
|
+
});
|
92918
|
+
btn.classList.add('on');
|
92919
|
+
|
92920
|
+
if (btn.getAttribute('data-value').indexOf('-') !== -1) {
|
92921
|
+
inpRotateClockwise.value = btn.getAttribute('data-value').replace('-', '');
|
92922
|
+
inpRotateCounter.value = '';
|
92923
|
+
} else {
|
92924
|
+
inpRotateCounter.value = btn.getAttribute('data-value');
|
92925
|
+
inpRotateClockwise.value = '';
|
92926
|
+
}
|
92927
|
+
|
92928
|
+
this.apply();
|
92929
|
+
});
|
92930
|
+
});
|
92931
|
+
const inpRotateClockwise = modalAnimateScroll.querySelector('.inp-rotate-clockwise');
|
92932
|
+
const inpRotateCounter = modalAnimateScroll.querySelector('.inp-rotate-counter');
|
92933
|
+
inpRotateClockwise.addEventListener('change', () => {
|
92934
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
92935
|
+
elms.forEach(elm => {
|
92936
|
+
elm.classList.remove('on');
|
92937
|
+
});
|
92938
|
+
inpRotateCounter.value = '';
|
92939
|
+
this.apply();
|
92940
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-rotate[data-value="-${inpRotateClockwise.value}"]`);
|
92941
|
+
if (btn) btn.classList.add('on');
|
92942
|
+
});
|
92943
|
+
inpRotateCounter.addEventListener('change', () => {
|
92944
|
+
let elms = modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
92945
|
+
elms.forEach(elm => {
|
92946
|
+
elm.classList.remove('on');
|
92947
|
+
});
|
92948
|
+
inpRotateClockwise.value = '';
|
92949
|
+
this.apply();
|
92950
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-rotate[data-value="${inpRotateCounter.value}"]`);
|
92951
|
+
if (btn) btn.classList.add('on');
|
92952
|
+
}); // Fade
|
92953
|
+
|
92954
|
+
let btnFade = modalAnimateScroll.querySelector('.cmd-fade');
|
92955
|
+
btnFade.addEventListener('click', () => {
|
92956
|
+
if (btnFade.classList.contains('on')) {
|
92957
|
+
btnFade.classList.remove('on');
|
92958
|
+
} else {
|
92959
|
+
btnFade.classList.add('on');
|
92960
|
+
}
|
92961
|
+
|
92962
|
+
this.apply();
|
92963
|
+
}); // Clear
|
92964
|
+
|
92965
|
+
let btnClear = modalAnimateScroll.querySelector('.cmd-clear-scrollanim');
|
92966
|
+
btnClear.addEventListener('click', () => {
|
92967
|
+
let activeElement;
|
92968
|
+
let target = this.getTarget();
|
92969
|
+
activeElement = target.element;
|
92970
|
+
if (!activeElement) return;
|
92971
|
+
this.builder.editor.saveForUndo();
|
92972
|
+
this.unselectSettings();
|
92973
|
+
this.cleanup(activeElement);
|
92974
|
+
activeElement.style.transform = '';
|
92975
|
+
activeElement.style.opacity = '';
|
92976
|
+
|
92977
|
+
if (this.builder.win.skrollrr) {
|
92978
|
+
this.builder.win.skrollrr.refresh();
|
92979
|
+
} //Trigger Change event
|
92980
|
+
|
92981
|
+
|
92982
|
+
this.builder.settings.onChange();
|
92983
|
+
}); //Extend onContentClick
|
92984
|
+
|
92985
|
+
let old = this.builder.settings.onContentClick;
|
92986
|
+
|
92987
|
+
this.builder.settings.onContentClick = () => {
|
92988
|
+
if (old) old.call(this); // call user's defined onRender
|
92989
|
+
|
92990
|
+
setTimeout(() => {
|
92991
|
+
this.read();
|
92992
|
+
}, 30);
|
92993
|
+
};
|
92994
|
+
}
|
92995
|
+
|
92996
|
+
unselectSettings() {
|
92997
|
+
let elms = this.modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
92998
|
+
elms.forEach(elm => {
|
92999
|
+
elm.classList.remove('on');
|
93000
|
+
});
|
93001
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
93002
|
+
elms.forEach(elm => {
|
93003
|
+
elm.classList.remove('on');
|
93004
|
+
});
|
93005
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-scale');
|
93006
|
+
elms.forEach(elm => {
|
93007
|
+
elm.classList.remove('on');
|
93008
|
+
});
|
93009
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
93010
|
+
elms.forEach(elm => {
|
93011
|
+
elm.classList.remove('on');
|
93012
|
+
});
|
93013
|
+
let btn = this.modalAnimateScroll.querySelector('.cmd-fade');
|
93014
|
+
btn.classList.remove('on');
|
93015
|
+
}
|
93016
|
+
|
93017
|
+
read() {
|
93018
|
+
// clear
|
93019
|
+
this.unselectSettings();
|
93020
|
+
let activeElement;
|
93021
|
+
let target = this.getTarget();
|
93022
|
+
activeElement = target.element;
|
93023
|
+
if (!activeElement) return; // console.log(activeElement)
|
93024
|
+
// start
|
93025
|
+
|
93026
|
+
let css1 = activeElement.getAttribute('data-bottom-top');
|
93027
|
+
if (!css1) css1 = activeElement.getAttribute('data-400-bottom');
|
93028
|
+
if (!css1) css1 = activeElement.getAttribute('data-200-bottom');
|
93029
|
+
if (!css1) css1 = activeElement.getAttribute('data--50-bottom'); // end
|
93030
|
+
|
93031
|
+
let css2 = activeElement.getAttribute('data-bottom');
|
93032
|
+
if (!css2) css2 = activeElement.getAttribute('data-center-top');
|
93033
|
+
if (!css2) css2 = activeElement.getAttribute('data-center'); // if(!css2) css2 = activeElement.getAttribute('data-top-bottom');
|
93034
|
+
|
93035
|
+
let dummyElm = document.querySelector('.dummy-elm');
|
93036
|
+
dummyElm.style.cssText = css1;
|
93037
|
+
let transform = this.getTransform(dummyElm, css1); // console.log(transform);
|
93038
|
+
|
93039
|
+
let btn = this.modalAnimateScroll.querySelector(`.cmd-slidex[data-value="${transform.translateX}"]`);
|
93040
|
+
if (btn) btn.classList.add('on');
|
93041
|
+
btn = this.modalAnimateScroll.querySelector(`.cmd-slidey[data-value="${transform.translateY}"]`);
|
93042
|
+
if (btn) btn.classList.add('on');
|
93043
|
+
btn = this.modalAnimateScroll.querySelector(`.cmd-scale[data-value="${transform.scale}"]`);
|
93044
|
+
if (btn) btn.classList.add('on');
|
93045
|
+
|
93046
|
+
if (transform.rotate) {
|
93047
|
+
btn = this.modalAnimateScroll.querySelector(`.cmd-rotate[data-value="${transform.rotate}"]`);
|
93048
|
+
if (btn) btn.classList.add('on');
|
93049
|
+
}
|
93050
|
+
|
93051
|
+
const inpSlideLeft = this.modalAnimateScroll.querySelector('.inp-slide-right');
|
93052
|
+
const inpSlideRight = this.modalAnimateScroll.querySelector('.inp-slide-left');
|
93053
|
+
inpSlideLeft.value = '';
|
93054
|
+
inpSlideRight.value = '';
|
93055
|
+
|
93056
|
+
if (transform.translateX) {
|
93057
|
+
if (transform.translateX.indexOf('-') !== -1) {
|
93058
|
+
inpSlideLeft.value = transform.translateX.replace('-', '');
|
93059
|
+
} else {
|
93060
|
+
inpSlideRight.value = transform.translateX;
|
93061
|
+
}
|
93062
|
+
}
|
93063
|
+
|
93064
|
+
const inpSlideUp = this.modalAnimateScroll.querySelector('.inp-slide-up');
|
93065
|
+
const inpSlideDown = this.modalAnimateScroll.querySelector('.inp-slide-down');
|
93066
|
+
inpSlideUp.value = '';
|
93067
|
+
inpSlideDown.value = '';
|
93068
|
+
|
93069
|
+
if (transform.translateY) {
|
93070
|
+
if (transform.translateY.indexOf('-') !== -1) {
|
93071
|
+
inpSlideDown.value = transform.translateY.replace('-', '');
|
93072
|
+
} else {
|
93073
|
+
inpSlideUp.value = transform.translateY;
|
93074
|
+
}
|
93075
|
+
}
|
93076
|
+
|
93077
|
+
const inpScale = this.modalAnimateScroll.querySelector('.inp-scale');
|
93078
|
+
inpScale.value = '';
|
93079
|
+
|
93080
|
+
if (transform.scale) {
|
93081
|
+
inpScale.value = transform.scale;
|
93082
|
+
}
|
93083
|
+
|
93084
|
+
const inpRotateCounter = this.modalAnimateScroll.querySelector('.inp-rotate-counter');
|
93085
|
+
const inpRotateClockwise = this.modalAnimateScroll.querySelector('.inp-rotate-clockwise');
|
93086
|
+
inpRotateCounter.value = '';
|
93087
|
+
inpRotateClockwise.value = '';
|
93088
|
+
|
93089
|
+
if (transform.rotate) {
|
93090
|
+
if (transform.rotate.indexOf('-') !== -1) {
|
93091
|
+
inpRotateClockwise.value = transform.rotate.replace('-', '');
|
93092
|
+
} else {
|
93093
|
+
inpRotateCounter.value = transform.rotate;
|
93094
|
+
}
|
93095
|
+
}
|
93096
|
+
|
93097
|
+
if (transform.opacity) {
|
93098
|
+
btn = this.modalAnimateScroll.querySelector('.cmd-fade');
|
93099
|
+
if (btn) btn.classList.add('on');
|
93100
|
+
}
|
93101
|
+
}
|
93102
|
+
|
93103
|
+
apply() {
|
93104
|
+
let activeElement;
|
93105
|
+
let target = this.getTarget();
|
93106
|
+
activeElement = target.element;
|
93107
|
+
if (!activeElement) return;
|
93108
|
+
let valX;
|
93109
|
+
let elms = this.modalAnimateScroll.querySelectorAll('.cmd-slidex');
|
93110
|
+
elms.forEach(elm => {
|
93111
|
+
if (elm.classList.contains('on')) {
|
93112
|
+
valX = elm.getAttribute('data-value');
|
93113
|
+
}
|
93114
|
+
});
|
93115
|
+
let valY;
|
93116
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-slidey');
|
93117
|
+
elms.forEach(elm => {
|
93118
|
+
if (elm.classList.contains('on')) {
|
93119
|
+
valY = elm.getAttribute('data-value');
|
93120
|
+
}
|
93121
|
+
});
|
93122
|
+
let scale;
|
93123
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-scale');
|
93124
|
+
elms.forEach(elm => {
|
93125
|
+
if (elm.classList.contains('on')) {
|
93126
|
+
scale = elm.getAttribute('data-value');
|
93127
|
+
}
|
93128
|
+
});
|
93129
|
+
let rotate;
|
93130
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-rotate');
|
93131
|
+
elms.forEach(elm => {
|
93132
|
+
if (elm.classList.contains('on')) {
|
93133
|
+
rotate = elm.getAttribute('data-value');
|
93134
|
+
}
|
93135
|
+
});
|
93136
|
+
let fade = false;
|
93137
|
+
let elm = this.modalAnimateScroll.querySelector('.cmd-fade');
|
93138
|
+
|
93139
|
+
if (elm.classList.contains('on')) {
|
93140
|
+
fade = true;
|
93141
|
+
}
|
93142
|
+
|
93143
|
+
const inpSlideLeft = this.modalAnimateScroll.querySelector('.inp-slide-right');
|
93144
|
+
if (inpSlideLeft.value !== '') valX = '-' + inpSlideLeft.value;
|
93145
|
+
const inpSlideRight = this.modalAnimateScroll.querySelector('.inp-slide-left');
|
93146
|
+
if (inpSlideRight.value !== '') valX = inpSlideRight.value;
|
93147
|
+
const inpSlideDown = this.modalAnimateScroll.querySelector('.inp-slide-down');
|
93148
|
+
if (inpSlideDown.value !== '') valY = '-' + inpSlideDown.value;
|
93149
|
+
const inpSlideUp = this.modalAnimateScroll.querySelector('.inp-slide-up');
|
93150
|
+
if (inpSlideUp.value !== '') valY = inpSlideUp.value;
|
93151
|
+
const inpScale = this.modalAnimateScroll.querySelector('.inp-scale');
|
93152
|
+
if (inpScale.value !== '') scale = inpScale.value;
|
93153
|
+
const inpRotateClockwise = this.modalAnimateScroll.querySelector('.inp-rotate-clockwise');
|
93154
|
+
if (inpRotateClockwise.value !== '') rotate = '-' + inpRotateClockwise.value;
|
93155
|
+
const inpRotateCounter = this.modalAnimateScroll.querySelector('.inp-rotate-counter');
|
93156
|
+
if (inpRotateCounter.value !== '') rotate = inpRotateCounter.value;
|
93157
|
+
let animStart = (valX ? ` translateX(${valX})` : '') + (valY ? ` translateY(${valY})` : '') + (rotate ? ` rotate(${rotate}deg)` : '') + (scale ? ` scale(${scale})` : '');
|
93158
|
+
animStart = animStart.trim();
|
93159
|
+
let animEnd = (valX ? ' translateX(0px)' : '') + (valY ? ' translateY(0px)' : '') + (rotate ? ' rotate(0deg)' : '') + (scale ? ' scale(1)' : '');
|
93160
|
+
animEnd = animEnd.trim();
|
93161
|
+
let sStart = (animStart ? 'transform: ' + animStart + ';' : '') + (fade ? 'opacity: 0;' : '');
|
93162
|
+
let sEnd = (animEnd ? 'transform: ' + animEnd + ';' : '') + (fade ? 'opacity: 1;' : '');
|
93163
|
+
this.builder.editor.saveForUndo();
|
93164
|
+
this.cleanup(activeElement);
|
93165
|
+
let dataStart;
|
93166
|
+
let dataEnd;
|
93167
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-start');
|
93168
|
+
elms.forEach(elm => {
|
93169
|
+
if (elm.classList.contains('on')) {
|
93170
|
+
dataStart = elm.getAttribute('data-value');
|
93171
|
+
}
|
93172
|
+
});
|
93173
|
+
elms = this.modalAnimateScroll.querySelectorAll('.cmd-end');
|
93174
|
+
elms.forEach(elm => {
|
93175
|
+
if (elm.classList.contains('on')) {
|
93176
|
+
dataEnd = elm.getAttribute('data-value');
|
93177
|
+
}
|
93178
|
+
});
|
93179
|
+
if (sStart !== '') activeElement.setAttribute(dataStart, sStart);
|
93180
|
+
if (sEnd !== '') activeElement.setAttribute(dataEnd, sEnd);
|
93181
|
+
|
93182
|
+
if (this.builder.win.skrollrr) {
|
93183
|
+
this.builder.win.skrollrr.refresh();
|
93184
|
+
} //Trigger Change event
|
93185
|
+
|
93186
|
+
|
93187
|
+
this.builder.settings.onChange();
|
93188
|
+
}
|
93189
|
+
|
93190
|
+
getTarget() {
|
93191
|
+
let target;
|
93192
|
+
let elms = this.modalAnimateScroll.querySelectorAll('.cmd-target');
|
93193
|
+
elms.forEach(elm => {
|
93194
|
+
if (elm.classList.contains('on')) {
|
93195
|
+
target = elm.getAttribute('data-value');
|
93196
|
+
}
|
93197
|
+
});
|
93198
|
+
let activeElement;
|
93199
|
+
|
93200
|
+
if (target === 'element') {
|
93201
|
+
activeElement = this.builder.editor.activeElement;
|
93202
|
+
}
|
93203
|
+
|
93204
|
+
if (target === 'column') {
|
93205
|
+
activeElement = this.builder.editor.activeCol;
|
93206
|
+
}
|
93207
|
+
|
93208
|
+
if (target === 'row') {
|
93209
|
+
let activeCol = this.builder.editor.activeCol;
|
93210
|
+
if (activeCol) activeElement = activeCol.parentNode;
|
93211
|
+
}
|
93212
|
+
|
93213
|
+
if (target === 'container') {
|
93214
|
+
let activeCol = this.builder.editor.activeCol;
|
93215
|
+
if (activeCol) activeElement = activeCol.parentNode.parentNode;
|
93216
|
+
}
|
93217
|
+
|
93218
|
+
return {
|
93219
|
+
'element': activeElement ? activeElement : false,
|
93220
|
+
'name': target ? target : false
|
93221
|
+
};
|
93222
|
+
}
|
93223
|
+
|
93224
|
+
getTransform(element, css) {
|
93225
|
+
let tX, tY, sc, rt;
|
93226
|
+
let arrTransform = this.parseComplexStyleProperty(css);
|
93227
|
+
if (arrTransform.translateX) tX = arrTransform.translateX[0];
|
93228
|
+
if (arrTransform.translateY) tY = arrTransform.translateY[0];
|
93229
|
+
if (arrTransform.scale) sc = arrTransform.scale[0];
|
93230
|
+
if (arrTransform.rotate) rt = arrTransform.rotate[0];
|
93231
|
+
let opacity = element.style.opacity;
|
93232
|
+
return {
|
93233
|
+
translateX: tX ? tX : false,
|
93234
|
+
translateY: tY ? tY : false,
|
93235
|
+
scale: sc ? sc : false,
|
93236
|
+
rotate: rt ? rt.replace('deg', '') : false,
|
93237
|
+
opacity: opacity ? opacity : false
|
93238
|
+
};
|
93239
|
+
}
|
93240
|
+
|
93241
|
+
parseComplexStyleProperty(str) {
|
93242
|
+
var regex = /(\w+)\((.+?)\)/g,
|
93243
|
+
transform = {},
|
93244
|
+
match;
|
93245
|
+
|
93246
|
+
while (match === regex.exec(str)) transform[match[1]] = transform[match[1]] ? transform[match[1]].concat([match[2]]) : [match[2]];
|
93247
|
+
|
93248
|
+
return transform;
|
93249
|
+
}
|
93250
|
+
|
93251
|
+
cleanup(elm) {
|
93252
|
+
elm.removeAttribute('data-center');
|
93253
|
+
elm.removeAttribute('data-center-top');
|
93254
|
+
elm.removeAttribute('data-top');
|
93255
|
+
elm.removeAttribute('data-top-bottom');
|
93256
|
+
elm.removeAttribute('data--50-bottom');
|
93257
|
+
elm.removeAttribute('data--100-bottom');
|
93258
|
+
elm.removeAttribute('data--150-bottom');
|
93259
|
+
elm.removeAttribute('data--200-bottom');
|
93260
|
+
elm.removeAttribute('data--300-bottom');
|
93261
|
+
elm.removeAttribute('data--400-bottom');
|
93262
|
+
elm.removeAttribute('data-bottom-top');
|
93263
|
+
elm.removeAttribute('data-400-bottom');
|
93264
|
+
elm.removeAttribute('data-300-bottom');
|
93265
|
+
elm.removeAttribute('data-200-bottom');
|
93266
|
+
elm.removeAttribute('data-150-bottom');
|
93267
|
+
elm.removeAttribute('data-100-bottom');
|
93268
|
+
elm.removeAttribute('data-50-bottom');
|
93269
|
+
elm.removeAttribute('data-bottom');
|
93270
|
+
}
|
93271
|
+
|
93272
|
+
edit() {
|
93273
|
+
this.modalAnimateScroll.classList.add('active');
|
93274
|
+
}
|
93275
|
+
|
93276
|
+
close() {
|
93277
|
+
this.modalAnimateScroll.classList.remove('active');
|
93278
|
+
}
|
93279
|
+
|
93280
|
+
}
|
93281
|
+
|
92348
93282
|
const dom = new Dom$1();
|
92349
93283
|
|
92350
93284
|
class ContentBox {
|
@@ -94977,10 +95911,16 @@ class ContentBox {
|
|
94977
95911
|
builderStuff = document.querySelector('#_cbhtml');
|
94978
95912
|
}
|
94979
95913
|
|
94980
|
-
this.builderStuff = builderStuff;
|
95914
|
+
this.builderStuff = builderStuff; // a hack to prevent html/body page get sliding
|
95915
|
+
|
95916
|
+
builderStuff.style.position = 'fixed';
|
95917
|
+
setTimeout(() => {
|
95918
|
+
builderStuff.style.position = '';
|
95919
|
+
}, 1200);
|
94981
95920
|
prepareSvgIcons$1(this); // Prepare icons (embed svg definitions for icons)
|
94982
95921
|
|
94983
95922
|
this.sidebar = new SideBar(this);
|
95923
|
+
this.animateScroll = new AnimateScroll(this);
|
94984
95924
|
|
94985
95925
|
if (!window.data_basic) {
|
94986
95926
|
dom.addExternalScripts([this.snippetUrl], () => {
|
@@ -96543,6 +97483,10 @@ class ContentBox {
|
|
96543
97483
|
this.editor.viewZoom();
|
96544
97484
|
}
|
96545
97485
|
|
97486
|
+
openAnimateScroll() {
|
97487
|
+
this.animateScroll.edit();
|
97488
|
+
}
|
97489
|
+
|
96546
97490
|
destroy() {
|
96547
97491
|
this.doc.removeEventListener('click', this.doDocumentClick, false);
|
96548
97492
|
if (this.iframe) document.removeEventListener('click', this.doDocumentClick, false);
|