@innovastudio/contentbuilder 1.5.35 → 1.5.36
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -82842,7 +82842,6 @@ class Resizable {
|
|
82842
82842
|
}
|
82843
82843
|
|
82844
82844
|
this.target = event.target.parentNode; // block
|
82845
|
-
|
82846
82845
|
this.clonedTarget = this.doc.querySelector(this.selector + '.cloned');
|
82847
82846
|
event.preventDefault();
|
82848
82847
|
event.stopPropagation();
|
@@ -82861,6 +82860,8 @@ class Resizable {
|
|
82861
82860
|
this.startX = touch.clientX;
|
82862
82861
|
this.startY = touch.clientY;
|
82863
82862
|
}
|
82863
|
+
this.target.style.transition = ''; // prevent anim/delay while dragging (in case a block has animation transition)
|
82864
|
+
if (this.clonedTarget) this.clonedTarget.style.transition = '';
|
82864
82865
|
|
82865
82866
|
//Initial
|
82866
82867
|
this.initialWidth = parseFloat(getComputedStyle(this.target).width);
|
@@ -83347,6 +83348,7 @@ class Draggable {
|
|
83347
83348
|
const y = startY - rect.top + containerRect.top;
|
83348
83349
|
target.setAttribute('data-startx', x);
|
83349
83350
|
target.setAttribute('data-starty', y);
|
83351
|
+
target.style.transition = ''; // prevent anim/delay while dragging (in case a block has animation transition)
|
83350
83352
|
|
83351
83353
|
// reset (from applyPercentage bottomTouched)
|
83352
83354
|
if (target.style.bottom) {
|
@@ -83423,33 +83425,35 @@ class Draggable {
|
|
83423
83425
|
updateBlockStyle(target) {
|
83424
83426
|
// Block placement should must not 50% outside the container
|
83425
83427
|
const container = target.closest('.box-canvas');
|
83426
|
-
|
83427
|
-
|
83428
|
-
|
83429
|
-
|
83430
|
-
|
83431
|
-
|
83432
|
-
|
83428
|
+
if (!target.parentNode.closest('.is-group')) {
|
83429
|
+
let containerHeight = container.offsetHeight;
|
83430
|
+
let containerWidth = container.offsetWidth;
|
83431
|
+
/*
|
83432
|
+
if(target.offsetTop + target.offsetHeight>=containerHeight) {
|
83433
|
+
target.style.top = containerHeight-target.offsetHeight +'px';
|
83434
|
+
}
|
83435
|
+
if(target.offsetTop<=0) {
|
83436
|
+
target.style.top = '0px';
|
83437
|
+
}
|
83438
|
+
if(target.offsetLeft + target.offsetWidth>=åcontainerWidth) {
|
83439
|
+
target.style.left = (containerWidth-target.offsetWidth) +'px';
|
83440
|
+
}
|
83441
|
+
if(target.offsetLeft<=0) {
|
83442
|
+
target.style.left = '0px';
|
83443
|
+
}
|
83444
|
+
*/
|
83445
|
+
if (target.offsetTop + target.offsetHeight <= target.offsetHeight / 2) {
|
83433
83446
|
target.style.top = '0px';
|
83434
|
-
|
83435
|
-
|
83436
|
-
target.style.
|
83437
|
-
|
83438
|
-
|
83447
|
+
}
|
83448
|
+
if (containerHeight - target.offsetTop <= target.offsetHeight / 2) {
|
83449
|
+
target.style.top = containerHeight - target.offsetHeight + 'px';
|
83450
|
+
}
|
83451
|
+
if (target.offsetLeft + target.offsetWidth <= target.offsetWidth / 2) {
|
83439
83452
|
target.style.left = '0px';
|
83440
|
-
|
83441
|
-
|
83442
|
-
|
83443
|
-
|
83444
|
-
}
|
83445
|
-
if (containerHeight - target.offsetTop <= target.offsetHeight / 2) {
|
83446
|
-
target.style.top = containerHeight - target.offsetHeight + 'px';
|
83447
|
-
}
|
83448
|
-
if (target.offsetLeft + target.offsetWidth <= target.offsetWidth / 2) {
|
83449
|
-
target.style.left = '0px';
|
83450
|
-
}
|
83451
|
-
if (containerWidth - target.offsetLeft <= target.offsetWidth / 2) {
|
83452
|
-
target.style.left = containerWidth - target.offsetWidth + 'px';
|
83453
|
+
}
|
83454
|
+
if (containerWidth - target.offsetLeft <= target.offsetWidth / 2) {
|
83455
|
+
target.style.left = containerWidth - target.offsetWidth + 'px';
|
83456
|
+
}
|
83453
83457
|
}
|
83454
83458
|
|
83455
83459
|
// Replace with ruler's alignment
|
@@ -87821,6 +87825,9 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
87821
87825
|
let clonedDiv = block.cloneNode(true);
|
87822
87826
|
clonedDiv.style.top = '20%';
|
87823
87827
|
clonedDiv.style.left = '20%';
|
87828
|
+
clonedDiv.style.transform = ''; // clear anim
|
87829
|
+
clonedDiv.style.transition = '';
|
87830
|
+
clonedDiv.style.opacity = '';
|
87824
87831
|
if (builder) {
|
87825
87832
|
const cloneBuilder = clonedDiv.querySelector(this.container);
|
87826
87833
|
cloneBuilder.innerHTML = '';
|
@@ -87830,7 +87837,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
87830
87837
|
this.applyBehaviorOn(cloneBuilder);
|
87831
87838
|
cloneBuilder.click();
|
87832
87839
|
} else {
|
87833
|
-
|
87840
|
+
box.appendChild(clonedDiv);
|
87834
87841
|
}
|
87835
87842
|
block.classList.remove('active');
|
87836
87843
|
this.doc.querySelectorAll('.clone').forEach(elm => elm.parentNode.removeChild(elm));
|