@innovastudio/contentbox 1.6.35 → 1.6.37

Sign up to get free protection for your applications and to get access to all the features.
@@ -36990,7 +36990,7 @@ class HtmlUtil {
36990
36990
  elm.removeAttribute('grideditor');
36991
36991
  elm.removeAttribute('gridoutline');
36992
36992
  });
36993
- elms = tmp.querySelectorAll('.is-row-tool,.is-col-tool,.is-rowadd-tool,.is-canvas-tool,.is-canvasadd-tool');
36993
+ elms = tmp.querySelectorAll('.is-row-tool,.is-col-tool,.is-rowadd-tool,.is-canvas-tool,.is-canvasadd-tool,.h-ruler,.v-ruler');
36994
36994
  elms.forEach(elm => {
36995
36995
  if (elm.previousSibling && elm.previousSibling.nodeType === Node.TEXT_NODE) {
36996
36996
  elm.previousSibling.remove();
@@ -37367,6 +37367,8 @@ class UndoRedo {
37367
37367
  dom.removeElements(tmp.querySelectorAll('.is-canvasadd-tool'));
37368
37368
  dom.removeElements(tmp.querySelectorAll('.ovl'));
37369
37369
  dom.removeElements(tmp.querySelectorAll('.row-add-initial'));
37370
+ dom.removeElements(tmp.querySelectorAll('.h-ruler'));
37371
+ dom.removeElements(tmp.querySelectorAll('.v-ruler'));
37370
37372
 
37371
37373
  // freeform
37372
37374
  elms = tmp.querySelectorAll('.is-block .handle, .is-block .rotate-handle');
@@ -38025,11 +38027,11 @@ const prepareSvgIcons = builder => {
38025
38027
  <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 16.572v2.42a2.01 2.01 0 0 1 -2.009 2.008h-7.981a2.01 2.01 0 0 1 -2.01 -2.009v-7.981a2.01 2.01 0 0 1 2.009 -2.01h2.954" /><path d="M9.167 4.511a2.04 2.04 0 0 1 2.496 -1.441l7.826 2.097a2.04 2.04 0 0 1 1.441 2.496l-2.097 7.826a2.04 2.04 0 0 1 -2.496 1.441l-7.827 -2.097a2.04 2.04 0 0 1 -1.441 -2.496l2.098 -7.827z" />
38026
38028
  </symbol>
38027
38029
 
38028
- <symbol id="icon-duplicate" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
38030
+ <symbol id="icon-duplicate2" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
38029
38031
  <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 16.572v2.42a2.01 2.01 0 0 1 -2.009 2.008h-7.981a2.01 2.01 0 0 1 -2.01 -2.009v-7.981a2.01 2.01 0 0 1 2.009 -2.01h2.954" /><path d="M9.167 4.511a2.04 2.04 0 0 1 2.496 -1.441l7.826 2.097a2.04 2.04 0 0 1 1.441 2.496l-2.097 7.826a2.04 2.04 0 0 1 -2.496 1.441l-7.827 -2.097a2.04 2.04 0 0 1 -1.441 -2.496l2.098 -7.827z" />
38030
38032
  </symbol>
38031
- <symbol id="icon-duplicate2" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
38032
- <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z" /><path d="M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2" />
38033
+ <symbol id="icon-duplicate" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
38034
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" />
38033
38035
  </symbol>
38034
38036
 
38035
38037
  <symbol id="icon-trash" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
@@ -89988,7 +89990,7 @@ class Rte {
89988
89990
  let html_elementrte = '';
89989
89991
  for (j = 0; j < builder.opts.elementButtons.length; j++) {
89990
89992
  btn = builder.opts.elementButtons[j].toLowerCase();
89991
- if (btn === 'left') html_elementrte += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrte += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrte += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrte += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'group') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Group')}" class="rte-group"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-group"></use></svg></button>`;else if (btn === 'ungroup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Ungroup')}" class="rte-ungroup"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-ungroup"></use></svg></button>`;else if (btn === 'duplicate') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Duplicate')}" class="rte-duplicate"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-duplicate"></use></svg></button>`;else if (btn === 'front') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Bring to Front')}" class="rte-front"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-forward"></use></svg></button>`;else if (btn === 'backward') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Send to Back')}" class="rte-backward"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-backward"></use></svg></button>`;else if (btn === 'moveup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Up')}" class="rte-moveup"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-up"></use></svg></button>`;else if (btn === 'movedown') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Down')}" class="rte-movedown"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-down"></use></svg></button>`;else if (btn === 'delete') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Delete')}" class="rte-delete"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-trash"></use></svg></button>`;else if (btn === 'blocksettings' && this.builder.canvas) html_elementrte += `<button tabindex="-1" title="${util.out('Block Settings')}" class="rte-blocksettings"><svg class="is-icon-flex"><use xlink:href="#icon-settings"></use></svg></button>`;else if (btn === 'undo') html_elementrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_elementrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_elementrtemore !== '') html_elementrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
89993
+ if (btn === 'left') html_elementrte += `<button tabindex="-1" title="${util.out('Align Left')}" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>`;else if (btn === 'center') html_elementrte += `<button tabindex="-1" title="${util.out('Align Center')}" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>`;else if (btn === 'right') html_elementrte += `<button tabindex="-1" title="${util.out('Align Right')}" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>`;else if (btn === 'full') html_elementrte += `<button tabindex="-1" title="${util.out('Align Full')}" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>`;else if (btn === 'gridtool') html_elementrte += `<button tabindex="-1" title="${util.out('Grid Tool')}" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>`;else if (btn === 'html') html_elementrte += `<button tabindex="-1" title="${util.out('HTML')}" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>`;else if (btn === 'preferences') html_elementrte += `<button tabindex="-1" title="${util.out('Preferences')}" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>`;else if (btn === 'addsnippet') html_elementrte += `<button tabindex="-1" title="${util.out('Add Snippet')}" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>`;else if (btn === 'group') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Group')}" class="rte-group"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-group"></use></svg></button>`;else if (btn === 'ungroup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Ungroup')}" class="rte-ungroup"><svg class="is-icon-flex" style="width:20px;height:20px;margin-top:-1px;"><use xlink:href="#icon-ungroup"></use></svg></button>`;else if (btn === 'duplicate') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Duplicate')}" class="rte-duplicate"><svg class="is-icon-flex" style="width:16px;height:16px;margin-top:-1px;"><use xlink:href="#icon-duplicate"></use></svg></button>`;else if (btn === 'front') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Bring to Front')}" class="rte-front"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-forward"></use></svg></button>`;else if (btn === 'backward') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Send to Back')}" class="rte-backward"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-stack-backward"></use></svg></button>`;else if (btn === 'moveup') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Up')}" class="rte-moveup"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-up"></use></svg></button>`;else if (btn === 'movedown') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Move Down')}" class="rte-movedown"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-arrow-down"></use></svg></button>`;else if (btn === 'delete') html_elementrte += `<button style="display:none" tabindex="-1" title="${util.out('Delete')}" class="rte-delete"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#icon-trash"></use></svg></button>`;else if (btn === 'blocksettings' && this.builder.canvas) html_elementrte += `<button tabindex="-1" title="${util.out('Block Settings')}" class="rte-blocksettings"><svg class="is-icon-flex"><use xlink:href="#icon-settings"></use></svg></button>`;else if (btn === 'undo') html_elementrte += `<button tabindex="-1" title="${util.out('Undo')}" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>`;else if (btn === 'redo') html_elementrte += `<button tabindex="-1" title="${util.out('Redo')}" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>`;else if (btn === 'aiassistant') html_elementrte += `<button tabindex="-1" title="${util.out('AI Assistant')}" class="rte-ai"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-message"></use></svg></button>`;else if (btn === 'snippets') html_elementrte += `<button tabindex="-1" title="${util.out('Snippets')}" class="rte-snippets"><svg class="is-icon-flex" style="width:19px;height:19px;"><use xlink:href="#icon-snippets"></use></svg></button>`;else if (btn === 'more' && html_elementrtemore !== '') html_elementrte += `<button tabindex="-1" title="${util.out('More')}" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>`;else if (btn === 'pageoptions') html_elementrte += `<button tabindex="-1" title="${util.out('Page Options')}" class="rte-pageoptions"><svg class="is-icon-flex"><use xlink:href="#icon-pagesize"></use></svg></button>`;else if (btn === 'print') html_elementrte += `<button tabindex="-1" title="${util.out('Print')}" class="rte-print"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-print"></use></svg></button>`;else if (btn === 'zoom') html_elementrte += `<button tabindex="-1" title="${util.out('Zoom')}" class="rte-zoom"><svg class="is-icon-flex" style="margin-top:1px;width:15px;height:15px;"><use xlink:href="#icon-zoom-in"></use></svg></button>`;else if (btn === 'livepreview') html_elementrte += `<button tabindex="-1" title="${util.out('Live Preview')}" class="rte-livepreview"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#icon-device-desktop"></use></svg></button>`;else if (btn === '|') {
89992
89994
  html_elementrte += '<div class="rte-separator"></div>';
89993
89995
  } else {
89994
89996
  html_elementrte += `<button tabindex="-1" title="button not found" data-plugin="${btn}"></button>`; //temporary (later will be replaced with plugin button)
@@ -90164,6 +90166,9 @@ class Rte {
90164
90166
  <div style="padding-top:4px">
90165
90167
  <input type="range" min="50" max="${zoomMax}" value="1" class="rte-zoom-slider is-rangeslider">
90166
90168
  </div>
90169
+ <div style="display:flex;justify-content:flex-end">
90170
+ <button title="${util.out('Reset')}" class="reset-zoom" style="background:transparent;padding:0;height:27px;text-decoration:underline">${util.out('Reset')}</button>
90171
+ </div>
90167
90172
  </div>
90168
90173
  </div>
90169
90174
 
@@ -91342,6 +91347,16 @@ class Rte {
91342
91347
  showTools();
91343
91348
  });
91344
91349
 
91350
+ // Reset Zoom
91351
+ const btnResetZoom = builderStuff.querySelector('.reset-zoom');
91352
+ btnResetZoom.addEventListener('click', () => {
91353
+ this.builder.opts.zoom = 1;
91354
+ localStorage.setItem('_zoom', 1); // Save
91355
+
91356
+ // setZoomOnArea
91357
+ this.builder.setZoomOnArea();
91358
+ });
91359
+
91345
91360
  // Zoom Modal
91346
91361
  this.inpZoomSlider.onfocus = () => {
91347
91362
  if (this.builder.onZoomStart) {
@@ -98860,7 +98875,6 @@ class ContentStuff$1 {
98860
98875
  <button title="${util.out('Settings')}" data-title="${util.out('Settings')}" style="width:37px;height:37px;background:none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>
98861
98876
  </div>
98862
98877
 
98863
-
98864
98878
  <div class="is-locked-indicator">
98865
98879
  <svg class="is-icon-flex"><use xlink:href="#icon-lock"></use></svg>
98866
98880
  </div>
@@ -99354,6 +99368,35 @@ class ContentStuff$1 {
99354
99368
  }
99355
99369
  .is-tool.is-element-tool .elm-settings { display: none; }
99356
99370
 
99371
+ /* is-block-tool
99372
+
99373
+ .is-tool.is-block-tool {
99374
+ background: rgba(243, 243, 243, 0.9);
99375
+ border-radius: 3px;
99376
+ overflow: hidden;
99377
+ top: 3px;
99378
+ right: 3px;
99379
+ left: auto;
99380
+ width: 25px;
99381
+ }
99382
+ .is-tool.is-block-tool button {
99383
+ width: 25px;
99384
+ height: 25px;
99385
+ background: transparent;
99386
+ display: flex;
99387
+ align-items: center;
99388
+ justify-content: center;
99389
+ }
99390
+ .is-tool.is-block-tool svg {
99391
+ width: 14px;
99392
+ height: 14px;
99393
+ fill: #000;
99394
+ }
99395
+ .is-block.active:not(.multi):not(.editable) .is-block-tool {
99396
+ display:flex;
99397
+ }
99398
+ */
99399
+
99357
99400
  /* is-column-tool */
99358
99401
 
99359
99402
  .is-tool.is-column-tool {
@@ -107222,7 +107265,25 @@ class Common {
107222
107265
  applyPercentage(block) {
107223
107266
  const zoom = this.zoom;
107224
107267
  const rect = this.getRect(block);
107225
- const container = block.parentNode;
107268
+ const container = block.closest('.box-canvas');
107269
+ const containerRect = this.getRect(container); // if container has top/left
107270
+
107271
+ this.horizontalRulerTop = container.querySelector('.h-ruler-top');
107272
+ this.horizontalRulerBottom = container.querySelector('.h-ruler-bottom');
107273
+ this.horizontalRulerMiddle = container.querySelector('.h-ruler-middle');
107274
+ this.verticalRulerLeft = container.querySelector('.v-ruler-left');
107275
+ this.verticalRulerRight = container.querySelector('.v-ruler-right');
107276
+ this.verticalRulerCenter = container.querySelector('.v-ruler-center');
107277
+
107278
+ // Check Edges
107279
+ let topTouched = false;
107280
+ let bottomTouched = false;
107281
+ let leftTouched = false;
107282
+ let rightTouched = false;
107283
+ if (this.horizontalRulerTop.hasAttribute('data-topTouched')) topTouched = true;
107284
+ if (this.horizontalRulerBottom.hasAttribute('data-bottomTouched')) bottomTouched = true;
107285
+ if (this.verticalRulerLeft.hasAttribute('data-leftTouched')) leftTouched = true;
107286
+ if (this.verticalRulerRight.hasAttribute('data-rightTouched')) rightTouched = true;
107226
107287
  let isChildBlock = false;
107227
107288
  if (block.parentNode.matches(this.selector)) {
107228
107289
  // child block
@@ -107230,7 +107291,7 @@ class Common {
107230
107291
  }
107231
107292
 
107232
107293
  // const containerRect = container.getBoundingClientRect(); // if container has top/left
107233
- const containerRect = this.getRect(container); // if container has top/left
107294
+ // const containerRect = this.getRect(container); // if container has top/left
107234
107295
  let left = (rect.left - containerRect.left) / container.offsetWidth * 100;
107235
107296
  let top = (rect.top - containerRect.top) / container.offsetHeight * 100;
107236
107297
  let isBlockFixed = block.classList.contains('block-steady');
@@ -107269,6 +107330,35 @@ class Common {
107269
107330
  block.style.left = left / zoom + '%';
107270
107331
  if (block.classList.contains('height-auto')) block.style.height = '';
107271
107332
  }
107333
+
107334
+ // Check
107335
+
107336
+ block.style.right = ''; //reset
107337
+ block.style.bottom = ''; //reset
107338
+
107339
+ if (topTouched) block.style.top = 0;
107340
+ // if(topTouched && bottomTouched) block.style.height = '100%';
107341
+ if (leftTouched) block.style.left = 0;
107342
+ // if(leftTouched && rightTouched) block.style.width = '100%';
107343
+
107344
+ if (topTouched && bottomTouched) {
107345
+ block.style.top = 0;
107346
+ block.style.bottom = 0;
107347
+ block.style.height = '';
107348
+ }
107349
+ if (leftTouched && rightTouched) {
107350
+ block.style.left = 0;
107351
+ block.style.right = 0;
107352
+ block.style.width = '';
107353
+ }
107354
+ if (bottomTouched && !topTouched) {
107355
+ block.style.bottom = 0;
107356
+ block.style.height = '';
107357
+ }
107358
+ if (rightTouched && !leftTouched) {
107359
+ block.style.right = 0;
107360
+ block.style.width = '';
107361
+ }
107272
107362
  }
107273
107363
  applyPixels(block) {
107274
107364
  const zoom = this.zoom;
@@ -107423,15 +107513,16 @@ class Common {
107423
107513
  right = Math.max(right, blockLeft + blockWidth);
107424
107514
  }
107425
107515
  });
107516
+ const container = blocks[0].parentNode;
107517
+ const containerRect = this.getRect(container);
107426
107518
  const group = this.doc.createElement('div');
107427
107519
  group.classList.add(className);
107428
107520
  group.classList.add(groupClassName);
107429
107521
  group.classList.add('block-steady');
107430
- group.style.top = top + 'px';
107431
- group.style.left = left + 'px';
107522
+ group.style.top = top - containerRect.top + 'px';
107523
+ group.style.left = left - containerRect.left + 'px';
107432
107524
  group.style.width = right + 1 - left + 'px';
107433
107525
  group.style.height = bottom + 1 - top + 'px';
107434
- const container = blocks[0].parentNode;
107435
107526
  container.appendChild(group);
107436
107527
  blocks.forEach(block => {
107437
107528
  if (!block.parentNode.matches(this.selector)) {
@@ -107440,8 +107531,8 @@ class Common {
107440
107531
  let blockLeft = parseFloat(block.style.left) || 0;
107441
107532
 
107442
107533
  // Adjust position relative to the group div
107443
- block.style.top = blockTop - top + 'px';
107444
- block.style.left = blockLeft - left + 'px';
107534
+ block.style.top = blockTop - top + containerRect.top + 'px';
107535
+ block.style.left = blockLeft - left + containerRect.left + 'px';
107445
107536
  group.appendChild(block);
107446
107537
  this.applyPercentage(block);
107447
107538
  }
@@ -107496,14 +107587,15 @@ class Common {
107496
107587
  const top = rect.top;
107497
107588
  const left = rect.left;
107498
107589
  const container = group.parentNode;
107590
+ const containerRect = this.getRect(container);
107499
107591
  group.querySelectorAll(this.selector).forEach(block => {
107500
107592
  this.applyPixels(block);
107501
107593
  let blockTop = parseFloat(block.style.top) || 0;
107502
107594
  let blockLeft = parseFloat(block.style.left) || 0;
107503
107595
 
107504
107596
  // Adjust position relative to the group div
107505
- block.style.top = blockTop + top + 'px';
107506
- block.style.left = blockLeft + left + 'px';
107597
+ block.style.top = blockTop + top - containerRect.top + 'px';
107598
+ block.style.left = blockLeft + left - containerRect.left + 'px';
107507
107599
  container.appendChild(block);
107508
107600
 
107509
107601
  // Remove all breakpoints
@@ -107715,10 +107807,23 @@ class Ruler {
107715
107807
  this.zoom = scale;
107716
107808
  }
107717
107809
  setup() {
107718
- this.elements = this.doc.querySelectorAll(this.selector);
107810
+ // this.elements = this.doc.querySelectorAll(this.selector);
107811
+ this.refresh();
107719
107812
  }
107720
107813
  refresh() {
107721
107814
  this.elements = this.doc.querySelectorAll(this.selector);
107815
+ const rulerHTML = `
107816
+ <div class="ruler h-ruler h-ruler-top""></div>
107817
+ <div class="ruler h-ruler h-ruler-bottom"></div>
107818
+ <div class="ruler h-ruler h-ruler-middle"></div>
107819
+ <div class="ruler v-ruler v-ruler-left"></div>
107820
+ <div class="ruler v-ruler v-ruler-right"></div>
107821
+ <div class="ruler v-ruler v-ruler-center"></div>
107822
+ `;
107823
+ const containers = this.doc.querySelectorAll('.box-canvas');
107824
+ containers.forEach(container => {
107825
+ if (!container.querySelector('.h-ruler-top')) container.insertAdjacentHTML('beforeend', rulerHTML);
107826
+ });
107722
107827
  }
107723
107828
  destroy() {
107724
107829
  [this.horizontalRulerTop, this.horizontalRulerBottom, this.verticalRulerLeft, this.verticalRulerRight].forEach(elm => {
@@ -107726,6 +107831,18 @@ class Ruler {
107726
107831
  });
107727
107832
  }
107728
107833
  hideRulers() {
107834
+ this.horizontalRulerTop.classList.remove('active');
107835
+ this.horizontalRulerBottom.classList.remove('active');
107836
+ this.horizontalRulerMiddle.classList.remove('active');
107837
+ this.verticalRulerLeft.classList.remove('active');
107838
+ this.verticalRulerRight.classList.remove('active');
107839
+ this.verticalRulerCenter.classList.remove('active');
107840
+ this.rulerTop = null;
107841
+ this.rulerBottom = null; //new
107842
+ this.rulerLeft = null;
107843
+ this.rulerRight = null;
107844
+ }
107845
+ hideRulers_bak() {
107729
107846
  this.horizontalRulerTop.style.top = '-1000px';
107730
107847
  this.horizontalRulerBottom.style.top = '-1000px';
107731
107848
  this.horizontalRulerMiddle.style.top = '-1000px';
@@ -107733,10 +107850,207 @@ class Ruler {
107733
107850
  this.verticalRulerRight.style.left = '-1000px';
107734
107851
  this.verticalRulerCenter.style.left = '-1000px';
107735
107852
  this.rulerTop = null;
107853
+ this.rulerBottom = null; //new
107736
107854
  this.rulerLeft = null;
107737
107855
  this.rulerRight = null;
107738
107856
  }
107739
107857
  updateRulers(block) {
107858
+ const container = block.closest('.box-canvas');
107859
+ this.horizontalRulerTop = container.querySelector('.h-ruler-top');
107860
+ this.horizontalRulerBottom = container.querySelector('.h-ruler-bottom');
107861
+ this.horizontalRulerMiddle = container.querySelector('.h-ruler-middle');
107862
+ this.verticalRulerLeft = container.querySelector('.v-ruler-left');
107863
+ this.verticalRulerRight = container.querySelector('.v-ruler-right');
107864
+ this.verticalRulerCenter = container.querySelector('.v-ruler-center');
107865
+ let transform = block.style.transform;
107866
+ if (transform.includes('rotate') || transform.includes('matrix3d')) return;
107867
+ let parentTransform = block.parentNode.style.transform;
107868
+ if (parentTransform.includes('rotate')) return;
107869
+ this.hideRulers();
107870
+ const top = block.offsetTop;
107871
+ const bottom = top + block.offsetHeight;
107872
+ const left = block.offsetLeft;
107873
+ const right = left + block.offsetWidth;
107874
+ const center = left + block.offsetWidth / 2;
107875
+ const middle = top + block.offsetHeight / 2;
107876
+ this.rulerTop = null;
107877
+ this.rulerBottom = null; //new
107878
+ this.rulerLeft = null;
107879
+ this.rulerRight = null;
107880
+ this.elements = container.querySelectorAll(this.selector);
107881
+ this.elements.forEach(element => {
107882
+ if (!this.doc.body.contains(element)) return; // in case element removed (eg. unGroup, block deleted)
107883
+
107884
+ if (block.contains(element)) return; // In case of group moving
107885
+
107886
+ let transform = element.style.transform;
107887
+ let parentTransform = element.parentNode.style.transform;
107888
+ if (!transform.includes('rotate') && !parentTransform.includes('rotate') && !transform.includes('matrix3d') && !parentTransform.includes('matrix3d') && element !== block && !element.classList.contains('cloned')) {
107889
+ const otherTop = element.offsetTop;
107890
+ const otherBottom = otherTop + element.offsetHeight;
107891
+ const otherLeft = element.offsetLeft;
107892
+ const otherRight = otherLeft + element.offsetWidth;
107893
+ const otherMiddle = otherTop + element.offsetHeight / 2;
107894
+ const otherCenter = otherLeft + element.offsetWidth / 2;
107895
+
107896
+ // block top
107897
+ if (otherTop - 4 <= top && top <= otherTop + 4) {
107898
+ this.horizontalRulerTop.style.top = otherTop + 'px';
107899
+ this.horizontalRulerTop.classList.add('active');
107900
+ let val = otherTop;
107901
+ if (this.rulerTop === null) this.rulerTop = val;
107902
+ }
107903
+ if (otherBottom - 4 <= top && top <= otherBottom + 4) {
107904
+ this.horizontalRulerTop.style.top = otherBottom + 'px';
107905
+ this.horizontalRulerTop.classList.add('active');
107906
+ let val = otherBottom;
107907
+ if (this.rulerTop === null) this.rulerTop = val;
107908
+ }
107909
+
107910
+ // block bottom
107911
+ if (otherTop - 4 <= bottom && bottom <= otherTop + 4) {
107912
+ /*
107913
+ _____
107914
+ ___________________|__x__|__ rulerBottom
107915
+ | other |
107916
+ */
107917
+ this.horizontalRulerBottom.style.top = otherTop + 'px';
107918
+ this.horizontalRulerBottom.classList.add('active');
107919
+ if (this.rulerBottom === null) this.rulerBottom = element.offsetTop; // new
107920
+ }
107921
+
107922
+ if (otherBottom - 4 <= bottom && bottom <= otherBottom + 4) {
107923
+ /*
107924
+ _____
107925
+ | other |__________|__x__|__ rulerBottom
107926
+
107927
+ */
107928
+ this.horizontalRulerBottom.style.top = otherBottom + 'px';
107929
+ this.horizontalRulerBottom.classList.add('active');
107930
+ if (this.rulerBottom === null) this.rulerBottom = element.offsetTop + element.offsetHeight; // new
107931
+ }
107932
+
107933
+ // block middle
107934
+ if (this.rulerTop === null && this.rulerBottom === null) {
107935
+ if (otherMiddle - 4 <= middle && middle <= otherMiddle + 4) {
107936
+ this.horizontalRulerMiddle.style.top = otherTop + (element.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
107937
+ this.horizontalRulerMiddle.classList.add('active');
107938
+ let val = otherTop + (element.offsetHeight - block.offsetHeight) / 2;
107939
+ if (this.rulerTop === null) this.rulerTop = val;
107940
+ }
107941
+ }
107942
+
107943
+ // block left
107944
+ if (otherLeft - 4 <= left && left <= otherLeft + 4) {
107945
+ this.verticalRulerLeft.style.left = otherLeft + 'px';
107946
+ this.verticalRulerLeft.classList.add('active');
107947
+ let val = otherLeft;
107948
+ if (this.rulerLeft === null) this.rulerLeft = val;
107949
+ }
107950
+ if (otherRight - 4 <= left && left <= otherRight + 4) {
107951
+ this.verticalRulerLeft.style.left = otherRight + 'px';
107952
+ this.verticalRulerLeft.classList.add('active');
107953
+ let val = otherRight;
107954
+ if (this.rulerLeft === null) this.rulerLeft = val;
107955
+ }
107956
+
107957
+ // block right
107958
+ if (otherLeft - 4 <= right && right <= otherLeft + 4) {
107959
+ this.verticalRulerRight.style.left = otherLeft + 'px';
107960
+ this.verticalRulerRight.classList.add('active');
107961
+ let val = otherLeft;
107962
+ if (this.rulerRight === null) this.rulerRight = val;
107963
+ }
107964
+ if (otherRight - 4 <= right && right <= otherRight + 4) {
107965
+ this.verticalRulerRight.style.left = otherRight + 'px';
107966
+ this.verticalRulerRight.classList.add('active');
107967
+ let val = otherRight;
107968
+ if (this.rulerRight === null) this.rulerRight = val;
107969
+ }
107970
+
107971
+ // block center
107972
+ if (this.rulerLeft === null && this.rulerRight === null) {
107973
+ if (otherCenter - 4 <= center && center <= otherCenter + 4) {
107974
+ this.verticalRulerCenter.style.left = otherLeft + (element.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
107975
+ this.verticalRulerCenter.classList.add('active');
107976
+ let val = otherLeft + (element.offsetWidth - block.offsetWidth) / 2;
107977
+ if (this.rulerLeft === null) this.rulerLeft = val;
107978
+ }
107979
+ }
107980
+ }
107981
+ });
107982
+
107983
+ // Edges
107984
+ const conTop = 0;
107985
+ const conBottom = container.offsetHeight;
107986
+ const conLeft = 0;
107987
+ const conRight = container.offsetWidth;
107988
+ const conCenter = container.offsetWidth / 2;
107989
+ const conMiddle = container.offsetHeight / 2;
107990
+
107991
+ // block top
107992
+ this.horizontalRulerTop.removeAttribute('data-topTouched');
107993
+ if (conTop - 4 <= top && top <= conTop + 4) {
107994
+ this.horizontalRulerTop.style.top = conTop + 'px';
107995
+ this.horizontalRulerTop.classList.add('active');
107996
+ let val = conTop;
107997
+ if (this.rulerTop === null) this.rulerTop = val;
107998
+ this.topTouched = true;
107999
+ this.horizontalRulerTop.setAttribute('data-topTouched', 1);
108000
+ }
108001
+
108002
+ // block bottom
108003
+ this.horizontalRulerBottom.removeAttribute('data-bottomTouched');
108004
+ if (conBottom - 4 <= bottom && bottom <= conBottom + 4) {
108005
+ this.horizontalRulerBottom.style.top = conBottom - 2 + 'px'; // -2 is an adjustment to make the line visible
108006
+ this.horizontalRulerBottom.classList.add('active');
108007
+ if (this.rulerBottom === null) this.rulerBottom = conBottom; //conRect.height;// or block.parentNode.offsetHeight; // new
108008
+
108009
+ this.bottomTouched = true;
108010
+ this.horizontalRulerBottom.setAttribute('data-bottomTouched', 1);
108011
+ }
108012
+
108013
+ // block middle
108014
+ if (this.rulerTop === null && this.rulerBottom === null) {
108015
+ if (conMiddle - 4 <= middle && middle <= conMiddle + 4) {
108016
+ this.horizontalRulerMiddle.style.top = conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
108017
+ this.horizontalRulerMiddle.classList.add('active');
108018
+ let val = conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2;
108019
+ if (this.rulerTop === null) this.rulerTop = val;
108020
+ }
108021
+ }
108022
+
108023
+ // block left
108024
+ this.verticalRulerLeft.removeAttribute('data-leftTouched');
108025
+ if (conLeft - 4 <= left && left <= conLeft + 4) {
108026
+ this.verticalRulerLeft.style.left = conLeft + 0 + 'px'; // +0 is an adjustment
108027
+ this.verticalRulerLeft.classList.add('active');
108028
+ let val = conLeft;
108029
+ if (this.rulerLeft === null) this.rulerLeft = val;
108030
+ this.verticalRulerLeft.setAttribute('data-leftTouched', 1);
108031
+ }
108032
+
108033
+ // block right
108034
+ this.verticalRulerRight.removeAttribute('data-rightTouched');
108035
+ if (conRight - 4 <= right && right <= conRight + 4) {
108036
+ this.verticalRulerRight.style.left = conRight - 2 + 'px'; // -2 is an adjustment
108037
+ this.verticalRulerRight.classList.add('active');
108038
+ let val = conRight;
108039
+ if (this.rulerRight === null) this.rulerRight = val;
108040
+ this.verticalRulerRight.setAttribute('data-rightTouched', 1);
108041
+ }
108042
+
108043
+ // block center
108044
+ if (this.rulerLeft === null && this.rulerRight === null) {
108045
+ if (conCenter - 4 <= center && center <= conCenter + 4) {
108046
+ this.verticalRulerCenter.style.left = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
108047
+ this.verticalRulerCenter.classList.add('active');
108048
+ let val = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2;
108049
+ if (this.rulerLeft === null) this.rulerLeft = val;
108050
+ }
108051
+ }
108052
+ }
108053
+ updateRulers_bak(block) {
107740
108054
  // if(block.querySelector(this.selector)) return; // group (because updateRules also calls parent group if child block is dragged)
107741
108055
 
107742
108056
  let transform = block.style.transform;
@@ -107754,6 +108068,7 @@ class Ruler {
107754
108068
  const center = left + block.offsetWidth / 2;
107755
108069
  const middle = top + block.offsetHeight / 2;
107756
108070
  this.rulerTop = null;
108071
+ this.rulerBottom = null; //new
107757
108072
  this.rulerLeft = null;
107758
108073
  this.rulerRight = null;
107759
108074
  let containerTop = 0;
@@ -107777,18 +108092,6 @@ class Ruler {
107777
108092
  const otherRight = rect.left + element.offsetWidth;
107778
108093
  const otherMiddle = rect.top + element.offsetHeight / 2;
107779
108094
  const otherCenter = rect.left + element.offsetWidth / 2;
107780
- if (otherMiddle - 4 <= middle && middle <= otherMiddle + 4) {
107781
- this.horizontalRulerMiddle.style.top = containerTop + otherTop + (element.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
107782
- let val = otherTop + (element.offsetHeight - block.offsetHeight) / 2;
107783
- if (this.rulerTop === null) this.rulerTop = val;
107784
- }
107785
- if (otherCenter - 4 <= center && center <= otherCenter + 4) {
107786
- this.verticalRulerCenter.style.left = otherLeft + (element.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
107787
- this.verticalRulerCenter.style.top = containerTop + 'px'; // adj
107788
-
107789
- let val = otherLeft + (element.offsetWidth - block.offsetWidth) / 2;
107790
- if (this.rulerLeft === null) this.rulerLeft = val;
107791
- }
107792
108095
 
107793
108096
  // block top
107794
108097
  if (otherTop - 4 <= top && top <= otherTop + 4) {
@@ -107804,14 +108107,38 @@ class Ruler {
107804
108107
 
107805
108108
  // block bottom
107806
108109
  if (otherTop - 4 <= bottom && bottom <= otherTop + 4) {
108110
+ /*
108111
+ _____
108112
+ ___________________|__x__|__ rulerBottom
108113
+ | other |
108114
+ */
107807
108115
  this.horizontalRulerBottom.style.top = containerTop + otherTop + 'px';
107808
- let val = otherTop - block.offsetHeight;
107809
- if (this.rulerTop === null) this.rulerTop = val;
108116
+
108117
+ // let val = otherTop - block.offsetHeight;
108118
+ // if(this.rulerTop===null) this.rulerTop = val;
108119
+ if (this.rulerBottom === null) this.rulerBottom = element.offsetTop; // new
107810
108120
  }
108121
+
107811
108122
  if (otherBottom - 4 <= bottom && bottom <= otherBottom + 4) {
108123
+ /*
108124
+ _____
108125
+ | other |__________|__x__|__ rulerBottom
108126
+
108127
+ */
107812
108128
  this.horizontalRulerBottom.style.top = containerTop + otherBottom + 'px';
107813
- let val = otherBottom - block.offsetHeight;
107814
- if (this.rulerTop === null) this.rulerTop = val;
108129
+
108130
+ // let val = otherBottom - block.offsetHeight;
108131
+ // if(this.rulerTop===null) this.rulerTop = val;
108132
+ if (this.rulerBottom === null) this.rulerBottom = element.offsetTop + element.offsetHeight; // new
108133
+ }
108134
+
108135
+ // block middle
108136
+ if (this.rulerTop === null && this.rulerBottom === null) {
108137
+ if (otherMiddle - 4 <= middle && middle <= otherMiddle + 4) {
108138
+ this.horizontalRulerMiddle.style.top = containerTop + otherTop + (element.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
108139
+ let val = otherTop + (element.offsetHeight - block.offsetHeight) / 2;
108140
+ if (this.rulerTop === null) this.rulerTop = val;
108141
+ }
107815
108142
  }
107816
108143
 
107817
108144
  // block left
@@ -107845,6 +108172,17 @@ class Ruler {
107845
108172
  let val = otherRight;
107846
108173
  if (this.rulerRight === null) this.rulerRight = val;
107847
108174
  }
108175
+
108176
+ // block center
108177
+ if (this.rulerLeft === null && this.rulerRight === null) {
108178
+ if (otherCenter - 4 <= center && center <= otherCenter + 4) {
108179
+ this.verticalRulerCenter.style.left = otherLeft + (element.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
108180
+ this.verticalRulerCenter.style.top = containerTop + 'px'; // adj
108181
+
108182
+ let val = otherLeft + (element.offsetWidth - block.offsetWidth) / 2;
108183
+ if (this.rulerLeft === null) this.rulerLeft = val;
108184
+ }
108185
+ }
107848
108186
  }
107849
108187
  });
107850
108188
 
@@ -107856,44 +108194,69 @@ class Ruler {
107856
108194
  const conRight = conRect.left + block.parentNode.offsetWidth;
107857
108195
  const conCenter = conRect.left + block.parentNode.offsetWidth / 2;
107858
108196
  const conMiddle = conRect.top + block.parentNode.offsetHeight / 2;
107859
- if (conMiddle - 4 <= middle && middle <= conMiddle + 4) {
107860
- this.horizontalRulerMiddle.style.top = containerTop + conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
107861
- let val = conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2;
107862
- if (this.rulerTop === null) this.rulerTop = val;
107863
- }
107864
- if (conCenter - 4 <= center && center <= conCenter + 4) {
107865
- this.verticalRulerCenter.style.left = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
107866
- this.verticalRulerCenter.style.top = containerTop + 'px';
107867
- let val = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2;
107868
- if (this.rulerLeft === null) this.rulerLeft = val;
107869
- }
107870
108197
 
107871
108198
  // block top
108199
+ this.horizontalRulerTop.removeAttribute('data-topTouched');
107872
108200
  if (conTop - 4 <= top && top <= conTop + 4) {
107873
108201
  this.horizontalRulerTop.style.top = containerTop + conTop + 'px';
107874
108202
  let val = conTop;
107875
108203
  if (this.rulerTop === null) this.rulerTop = val;
108204
+ this.topTouched = true;
108205
+ this.horizontalRulerTop.setAttribute('data-topTouched', 1);
107876
108206
  }
108207
+
107877
108208
  // block bottom
108209
+ this.horizontalRulerBottom.removeAttribute('data-bottomTouched');
107878
108210
  if (conBottom - 4 <= bottom && bottom <= conBottom + 4) {
107879
- this.horizontalRulerBottom.style.top = containerTop + conBottom - 3 + 'px'; // -3 is an adjustment to make the line visible
108211
+ this.horizontalRulerBottom.style.top = containerTop + conBottom - 2 + 'px'; // -2 is an adjustment to make the line visible
107880
108212
 
107881
- let val = conBottom - block.offsetHeight;
107882
- if (this.rulerTop === null) this.rulerTop = val;
108213
+ // let val = conBottom - block.offsetHeight;
108214
+ // if(this.rulerTop===null) this.rulerTop = val;
108215
+ if (this.rulerBottom === null) this.rulerBottom = conRect.height; // or block.parentNode.offsetHeight; // new
108216
+
108217
+ this.bottomTouched = true;
108218
+ this.horizontalRulerBottom.setAttribute('data-bottomTouched', 1);
108219
+ }
108220
+
108221
+ // block middle
108222
+ if (this.rulerTop === null && this.rulerBottom === null) {
108223
+ if (conMiddle - 4 <= middle && middle <= conMiddle + 4) {
108224
+ this.horizontalRulerMiddle.style.top = containerTop + conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2 + block.offsetHeight / 2 + 'px';
108225
+ let val = conTop + (block.parentNode.offsetHeight - block.offsetHeight) / 2;
108226
+ if (this.rulerTop === null) this.rulerTop = val;
108227
+ }
107883
108228
  }
108229
+
107884
108230
  // block left
108231
+ this.verticalRulerLeft.removeAttribute('data-leftTouched');
107885
108232
  if (conLeft - 4 <= left && left <= conLeft + 4) {
107886
- this.verticalRulerLeft.style.left = conLeft + 2 + 'px'; // +3 is an adjustment
107887
- this.verticalRulerLeft.style.top = containerTop + 'px';
108233
+ this.verticalRulerLeft.style.left = conLeft + 0 + 'px'; // +0 is an adjustment
108234
+ this.verticalRulerLeft.style.top = containerTop + 'px'; // adj
108235
+
107888
108236
  let val = conLeft;
107889
108237
  if (this.rulerLeft === null) this.rulerLeft = val;
108238
+ this.verticalRulerLeft.setAttribute('data-leftTouched', 1);
107890
108239
  }
108240
+
107891
108241
  // block right
108242
+ this.verticalRulerRight.removeAttribute('data-rightTouched');
107892
108243
  if (conRight - 4 <= right && right <= conRight + 4) {
107893
108244
  this.verticalRulerRight.style.left = conRight - 2 + 'px'; // -2 is an adjustment
107894
- this.verticalRulerRight.style.top = containerTop + 'px';
108245
+ this.verticalRulerRight.style.top = containerTop + 'px'; // adj
108246
+
107895
108247
  let val = conRight;
107896
108248
  if (this.rulerRight === null) this.rulerRight = val;
108249
+ this.verticalRulerRight.setAttribute('data-rightTouched', 1);
108250
+ }
108251
+
108252
+ // block center
108253
+ if (this.rulerLeft === null && this.rulerRight === null) {
108254
+ if (conCenter - 4 <= center && center <= conCenter + 4) {
108255
+ this.verticalRulerCenter.style.left = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2 + block.offsetWidth / 2 + 'px';
108256
+ this.verticalRulerCenter.style.top = containerTop + 'px';
108257
+ let val = conLeft + (block.parentNode.offsetWidth - block.offsetWidth) / 2;
108258
+ if (this.rulerLeft === null) this.rulerLeft = val;
108259
+ }
107897
108260
  }
107898
108261
  }
107899
108262
  }
@@ -108368,38 +108731,131 @@ class Resizable {
108368
108731
  }
108369
108732
 
108370
108733
  // Replace with ruler's alignment
108371
- if (this.ruler.rulerTop !== null) {
108372
- target.style.top = this.ruler.rulerTop + 'px';
108373
- // if container has top/left
108374
- if (target.parentNode.matches(this.selector)) {
108375
- const containerRect = target.parentNode.getBoundingClientRect();
108376
- target.style.top = this.ruler.rulerTop - containerRect.top + 'px';
108734
+
108735
+ if (this.resizeHandle.includes('top')) {
108736
+ if (this.ruler.rulerTop !== null) {
108737
+ //bottom fixed
108738
+ let targetBottom = target.offsetTop + target.offsetHeight;
108739
+ target.style.top = this.ruler.rulerTop + 'px';
108740
+ target.style.height = targetBottom - this.ruler.rulerTop + 'px';
108377
108741
  }
108378
108742
  }
108379
-
108380
- // If resizing by dragging the right corners (top or bottom)
108381
- if (this.resizeHandle === 'top-right' || this.resizeHandle === 'bottom-right' || this.resizeHandle === 'right') {
108382
- // Check if vertical right ruler visible (has value)
108743
+ if (this.resizeHandle.includes('bottom')) {
108744
+ if (this.ruler.rulerBottom !== null) {
108745
+ // top fixed
108746
+ target.style.height = this.ruler.rulerBottom - target.offsetTop + 'px';
108747
+ }
108748
+ }
108749
+ if (this.resizeHandle.includes('left')) {
108750
+ if (this.ruler.rulerLeft !== null) {
108751
+ //right fixed
108752
+ let targetRight = target.offsetLeft + target.offsetWidth;
108753
+ target.style.left = this.ruler.rulerLeft + 'px';
108754
+ target.style.width = targetRight - this.ruler.rulerLeft + 'px';
108755
+ }
108756
+ }
108757
+ if (this.resizeHandle.includes('right')) {
108383
108758
  if (this.ruler.rulerRight !== null) {
108384
- // If so, keep the left position
108385
- // target.style.left = newLeft + 'px';
108759
+ //left fixed
108760
+ target.style.width = this.ruler.rulerRight - target.offsetLeft + 'px';
108761
+ }
108762
+ }
108386
108763
 
108387
- // And update the width to align with vertical right ruler
108388
- const rect = target.getBoundingClientRect();
108389
- target.style.width = this.ruler.rulerRight - rect.left + 'px';
108764
+ // Convert px to %
108765
+ this.common.applyPercentage(target);
108766
+ setTimeout(() => {
108767
+ const breakpoint = this.doc.body.getAttribute('data-breakpoint');
108768
+
108769
+ // const screenWidth = window.innerWidth;
108770
+ // let defaultPoint;
108771
+ // if(screenWidth<=1920) {
108772
+ // defaultPoint = 1366;
108773
+ // } else {
108774
+ // defaultPoint = 1900;
108775
+ // }
108776
+
108777
+ let largeScreenBreakpoint = 1280; //1920
108778
+ largeScreenBreakpoint = window.innerWidth - 360; //351
108779
+ if (largeScreenBreakpoint < 1280) largeScreenBreakpoint = 1280;
108780
+ let isPrint = false;
108781
+ let elmBox = target.closest('[data-pagesize]');
108782
+ if (elmBox) {
108783
+ if (elmBox.getAttribute('data-pagesize').includes('web')) ; else {
108784
+ isPrint = true;
108785
+ }
108390
108786
  }
108391
- } else if (this.resizeHandle === 'top-left' || this.resizeHandle === 'bottom-left' || this.resizeHandle === 'left') {
108392
- if (this.ruler.rulerLeft !== null) {
108393
- const currentRight = this.initialLeft + this.initialWidth;
108787
+ if (isPrint) {
108788
+ target.setAttribute('data--t', target.style.top);
108789
+ target.setAttribute('data--l', target.style.left);
108790
+ target.setAttribute('data--b', target.style.bottom);
108791
+ target.setAttribute('data--r', target.style.right);
108792
+ target.setAttribute('data--w', target.style.width);
108793
+ target.setAttribute('data--h', target.style.height);
108794
+ } else {
108795
+ if (breakpoint && breakpoint < largeScreenBreakpoint) {
108796
+ target.setAttribute('data--t-' + breakpoint, target.style.top);
108797
+ target.setAttribute('data--l-' + breakpoint, target.style.left);
108798
+ target.setAttribute('data--b-' + breakpoint, target.style.bottom);
108799
+ target.setAttribute('data--r-' + breakpoint, target.style.right);
108800
+ if (!(target.classList.contains('fluid') && target.closest('.autolayout'))) {
108801
+ target.setAttribute('data--w-' + breakpoint, target.style.width);
108802
+ }
108803
+ target.setAttribute('data--h-' + breakpoint, target.style.height);
108804
+ } else {
108805
+ target.setAttribute('data--t', target.style.top);
108806
+ target.setAttribute('data--l', target.style.left);
108807
+ target.setAttribute('data--b', target.style.bottom);
108808
+ target.setAttribute('data--r', target.style.right);
108809
+ target.setAttribute('data--w', target.style.width);
108810
+ target.setAttribute('data--h', target.style.height);
108811
+ }
108812
+ }
108813
+ target.removeAttribute('data-prev'); // reset
108814
+ target.removeAttribute('data-fluid');
108815
+ }, 30); // delay needed since we use updateHeight() previously that has 20ms process
108394
108816
 
108395
- // if container has top/left
108396
- const containerRect = target.parentNode.getBoundingClientRect();
108397
- this.ruler.rulerLeft = this.ruler.rulerLeft - containerRect.left;
108817
+ if (this.onChange) this.onChange();
108818
+ }
108819
+ updateBlockStyle_bak(target) {
108820
+ if (target.querySelector(this.selector)) ; else {
108821
+ // this.common.updateHeight(target);
108822
+ if (target.classList.contains('height-auto')) target.style.height = '';
108823
+ }
108398
108824
 
108399
- // And update the width to align with vertical left ruler
108400
- target.style.left = this.ruler.rulerLeft + 'px';
108401
- let newWidth = currentRight - this.ruler.rulerLeft;
108402
- target.style.width = newWidth + 'px';
108825
+ // Replace with ruler's alignment
108826
+ const containerRect = this.common.getRect(target.parentNode); // if container has top/left
108827
+
108828
+ if (this.resizeHandle.includes('top')) {
108829
+ if (this.ruler.rulerTop !== null) {
108830
+ //bottom fixed
108831
+ const rect = target.getBoundingClientRect();
108832
+ let targetBottom = rect.top + rect.height;
108833
+ target.style.top = this.ruler.rulerTop - containerRect.top + 'px';
108834
+ target.style.height = targetBottom - this.ruler.rulerTop + 'px';
108835
+ }
108836
+ }
108837
+ if (this.resizeHandle.includes('bottom')) {
108838
+ if (this.ruler.rulerBottom !== null) {
108839
+ // top fixed
108840
+ // const rect = target.getBoundingClientRect();
108841
+ // target.style.height = this.ruler.rulerBottom - rect.top + containerRect.top + 'px';
108842
+ target.style.height = this.ruler.rulerBottom - target.offsetTop + 'px';
108843
+ }
108844
+ }
108845
+ if (this.resizeHandle.includes('left')) {
108846
+ if (this.ruler.rulerLeft !== null) {
108847
+ //right fixed
108848
+ const rect = target.getBoundingClientRect();
108849
+ let targetRight = rect.left + rect.width;
108850
+ target.style.left = this.ruler.rulerLeft - containerRect.left + 'px';
108851
+ target.style.width = targetRight - this.ruler.rulerLeft + 'px';
108852
+ }
108853
+ }
108854
+ if (this.resizeHandle.includes('right')) {
108855
+ if (this.ruler.rulerRight !== null) {
108856
+ //left fixed
108857
+ const rect = target.getBoundingClientRect();
108858
+ target.style.width = this.ruler.rulerRight - rect.left + 'px';
108403
108859
  }
108404
108860
  }
108405
108861
 
@@ -108602,6 +109058,10 @@ class Draggable {
108602
109058
  const y = startY - rect.top + containerRect.top;
108603
109059
  target.setAttribute('data-startx', x);
108604
109060
  target.setAttribute('data-starty', y);
109061
+
109062
+ // reset (from applyPercentage bottomTouched)
109063
+ target.style.height = target.offsetHeight + 'px';
109064
+ target.style.bottom = '';
108605
109065
  this.common.applyPixels(target);
108606
109066
  });
108607
109067
  this.clickedBlock = this.common.getSelectedBlock();
@@ -108669,10 +109129,9 @@ class Draggable {
108669
109129
  }
108670
109130
  updateBlockStyle(target) {
108671
109131
  // Replace with ruler's alignment
108672
- const containerRect = this.common.getRect(target.parentNode); // if container has top/left
108673
- const initialWidth = parseFloat(getComputedStyle(target).width);
108674
- if (this.ruler.rulerTop !== null) target.style.top = this.ruler.rulerTop - containerRect.top + 'px';
108675
- if (this.ruler.rulerLeft !== null) target.style.left = this.ruler.rulerLeft - containerRect.left + 'px';else if (this.ruler.rulerRight !== null) target.style.left = this.ruler.rulerRight - initialWidth - containerRect.left + 'px';
109132
+ if (this.ruler.rulerTop !== null) target.style.top = this.ruler.rulerTop + 'px';
109133
+ if (this.ruler.rulerBottom !== null) target.style.top = this.ruler.rulerBottom - target.offsetHeight + 'px'; //new
109134
+ if (this.ruler.rulerLeft !== null) target.style.left = this.ruler.rulerLeft + 'px';else if (this.ruler.rulerRight !== null) target.style.left = this.ruler.rulerRight - target.offsetWidth + 'px';
108676
109135
  this.doc.querySelectorAll('[data-startx]').forEach(elm => elm.removeAttribute('data-startx'));
108677
109136
  this.doc.querySelectorAll('[data-starty]').forEach(elm => elm.removeAttribute('data-starty'));
108678
109137
  this.common.applyPercentage(target);
@@ -109363,6 +109822,9 @@ class EditableBlocks {
109363
109822
  win: this.win,
109364
109823
  onContentClick: this.onContentClick,
109365
109824
  onEditStart: (event, block) => {
109825
+ const container = block.querySelector('.is-container');
109826
+ if (!container) return; // if block is empty, no edit required
109827
+
109366
109828
  if (block.classList.contains('clone')) {
109367
109829
  const clonedTarget = this.doc.querySelector(this.selector + '.cloned');
109368
109830
  this.onEditStart(event, clonedTarget);
@@ -109533,133 +109995,181 @@ class BlockModal {
109533
109995
  </div>
109534
109996
  </div>
109535
109997
 
109998
+ <div class="label-page-grayscale label checkbox grayscale" style="padding:30px 0 10px;">
109999
+ <label class="label-checkbox" for="chkPageGrayscale"><input id="chkPageGrayscale" class="chk-grayscale" type="checkbox" /> ${util.out('Grayscale')}</label>
110000
+ </div>
110001
+
110002
+ <div style="padding-top:30px;padding-bottom:3px;">${util.out('Auto layout on mobile')}:</div>
110003
+
110004
+ <label class="switch"><input id="inpAutoLayout" type="checkbox" checked=""><span class="slider round"></span></label>
110005
+
109536
110006
  </div>
109537
110007
 
109538
- <div class="modal-content">
110008
+ <div class="modal-content" style="padding:0">
109539
110009
 
109540
- <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
109541
- <div style="display:flex;">
109542
- <button title="${util.out('Background Color')}" class="input-block-bgcolor is-btn-color" style="margin-right:15px"></button>
109543
- <button title="${util.out('Gradient')}" class="btn-block-gradient classic" data-value="+"> ${util.out('Gradient')} </button>
110010
+ <div class="is-tabs" data-group="blocksettings" style="background-color:transparent">
110011
+ <a title="${util.out('General')}" id="tabBlockGeneral" href="#" data-content="divBlockGeneral" class="active">${util.out('General')}</a>
110012
+ <a title="${util.out('More')}" id="tabBlockMore" href="#" data-content="divBlockMore">${util.out('More')}</a>
109544
110013
  </div>
109545
110014
 
109546
- <div style="padding-top:20px;padding-bottom: 3px;">${util.out('Background Image')}:</div>
109547
- <div>
109548
- <div class="asset-block-preview" style="display:none"></div>
109549
- <div style="display: flex">
109550
- <button title="${util.out('Image')}" class="btn-block-bgimage">
109551
- <svg class="is-icon-flex"><use xlink:href="#ion-image"></use></svg>
109552
- <span>${util.out('Image')}</span>
110015
+ <div id="divBlockMore" class="is-tab-content" data-group="blocksettings" tabindex="-1" style="padding:25px 25px 28px">
110016
+
110017
+ <div class="div-target" style="display: flex;justify-content: flex-end;padding: 5px 0 0;">
110018
+ <button title="${util.out('Desktop')}" class="input-device on" data-value="" style="width:40px;height:25px;">
110019
+ <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-desktop"></use></svg>
110020
+ </button>
110021
+ <button title="${util.out('Laptop/Tablet (Landscape)')}" class="input-device" data-value="md" style="width:40px;height:25px;">
110022
+ <svg class="is-icon-flex" style="width:16px;height:16px;transform:rotate(-90deg)"><use xlink:href="#icon-device-tablet"></use></svg>
110023
+ </button>
110024
+ <button title="${util.out('Tablet (Portrait)')}" class="input-device" data-value="sm" style="width:40px;height:25px;">
110025
+ <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-device-tablet"></use></svg>
110026
+ </button>
110027
+ <button title="${util.out('Mobile')}" class="input-device" data-value="xs" style="width:40px;height:25px;">
110028
+ <svg class="is-icon-flex" style="width:13px;height:13px"><use xlink:href="#icon-device-mobile"></use></svg>
109553
110029
  </button>
109554
- <button title="${util.out('Select')}" class="btn-block-asset">${this.builder.opts.selectIcon}</button>
109555
- <button title="${util.out('Remove')}" class="btn-block-clear"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>
109556
- <button title="${util.out('Adjust')}" class="btn-block-adjust" style="width:40px"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>
109557
110030
  </div>
109558
- </div>
109559
110031
 
109560
- <div class="div-content-textcolor flex flex-col">
109561
- <div style="padding-top:20px;padding-bottom:3px;">${util.out('Text Color')}:</div>
109562
- <div class="flex flex-row">
109563
- <button title="0" data-textcolor="dark">${util.out('Dark')}</button>
109564
- <button title="10" data-textcolor="light">${util.out('Light')}</button>
109565
-
109566
- <button title="${util.out('Clear')}" data-textcolor=""><svg class="is-icon-flex" style="flex:none;width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
110032
+ <div style="padding-top:0;padding-bottom:3px;">${util.out('Visibility')}:</div>
110033
+ <div class="div-visibility" style="display:flex;">
110034
+ <button title="${util.out('Visible')}" class="input-visible on" data-value="sm" style="width:100px;height:34px;">
110035
+ <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye"></use></svg>
110036
+ <span>${util.out('Visible')}</span>
110037
+ </button>
110038
+ <button title="${util.out('Hidden')}" class="input-hidden" data-value="xs" style="width:100px;height:34px;">
110039
+ <svg class="is-icon-flex" style="width:16px;height:16px"><use xlink:href="#icon-eye-off"></use></svg>
110040
+ <span>${util.out('Hidden')}</span>
110041
+ </button>
109567
110042
  </div>
110043
+
109568
110044
  </div>
109569
110045
 
109570
- <div class="label checkbox grayscale" style="padding:30px 0 10px;">
109571
- <label class="label-block-grayscale label-checkbox" for="chkBlockGrayscale"><input id="chkBlockGrayscale" class="chk-grayscale" type="checkbox" /> ${util.out('Grayscale')}</label>
109572
- </div>
110046
+ <div id="divBlockGeneral" class="is-tab-content active" data-group="blocksettings" style="display:flex" tabindex="-1" style="padding:25px 25px 28px">
109573
110047
 
109574
- <button title="${util.out('Remove Content/Text')}" class="btn-clear-text" style="margin-top:20px">
109575
- <svg class="is-icon-flex"><use xlink:href="#icon-trash"></use></svg>
109576
- <span>${util.out('Remove Content/Text')}</span>
109577
- </button>
110048
+ <div style="padding-bottom: 3px;">${util.out('Background Color')}:</div>
110049
+ <div style="display:flex;">
110050
+ <button title="${util.out('Background Color')}" class="input-block-bgcolor is-btn-color" style="margin-right:15px"></button>
110051
+ <button title="${util.out('Gradient')}" class="btn-block-gradient classic" data-value="+"> ${util.out('Gradient')} </button>
110052
+ </div>
109578
110053
 
109579
- <button title="${util.out('Clear Breakpoints')}" class="btn-clear-breakpoint" style="margin-top:20px">
109580
- <svg class="is-icon-flex"><use xlink:href="#icon-trash"></use></svg>
109581
- <span>${util.out('Clear Breakpoints')}</span>
109582
- </button>
110054
+ <div style="padding-top:20px;padding-bottom: 3px;">${util.out('Background Image')}:</div>
110055
+ <div>
110056
+ <div class="asset-block-preview" style="display:none"></div>
110057
+ <div style="display: flex">
110058
+ <button title="${util.out('Image')}" class="btn-block-bgimage">
110059
+ <svg class="is-icon-flex"><use xlink:href="#ion-image"></use></svg>
110060
+ <span>${util.out('Image')}</span>
110061
+ </button>
110062
+ <button title="${util.out('Select')}" class="btn-block-asset">${this.builder.opts.selectIcon}</button>
110063
+ <button title="${util.out('Remove')}" class="btn-block-clear"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>
110064
+ <button title="${util.out('Adjust')}" class="btn-block-adjust" style="width:40px"><svg class="is-icon-flex"><use xlink:href="#ion-wrench"></use></svg></button>
110065
+ </div>
110066
+ </div>
109583
110067
 
109584
- <div style="padding-top:23px;padding-bottom:3px;">${util.out('Lock')}:</div>
110068
+ <div class="div-content-textcolor flex flex-col">
110069
+ <div style="padding-top:20px;padding-bottom:3px;">${util.out('Text Color')}:</div>
110070
+ <div class="flex flex-row">
110071
+ <button title="0" data-textcolor="dark">${util.out('Dark')}</button>
110072
+ <button title="10" data-textcolor="light">${util.out('Light')}</button>
110073
+
110074
+ <button title="${util.out('Clear')}" data-textcolor=""><svg class="is-icon-flex" style="flex:none;width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>
110075
+ </div>
110076
+ </div>
109585
110077
 
109586
- <label class="switch"><input id="inpLockBlock" type="checkbox" checked=""><span class="slider round"></span></label>
110078
+ <div class="label-block-grayscale label checkbox grayscale" style="padding:30px 0 10px;">
110079
+ <label class="label-checkbox" for="chkBlockGrayscale"><input id="chkBlockGrayscale" class="chk-grayscale" type="checkbox" /> ${util.out('Grayscale')}</label>
110080
+ </div>
109587
110081
 
109588
- <div id="divBlockPos">
110082
+ <button title="${util.out('Remove Content/Text')}" class="btn-clear-text" style="margin-top:20px">
110083
+ <svg class="is-icon-flex"><use xlink:href="#icon-trash"></use></svg>
110084
+ <span>${util.out('Remove Content/Text')}</span>
110085
+ </button>
109589
110086
 
109590
- <div class="flex" style="gap:10px">
109591
- <div>
109592
- <label for="inpBlockTop" class="flex" style="padding:10px 0 3px;">${util.out('Top')}:</label>
109593
- <div style="display:flex">
109594
- <input id="inpBlockTop" class="inp-block-top" type="text" style="width:74px;height:35px">
109595
- <select id="inpBlockTopUnit">
109596
- <option></option>
109597
- <option>px</option>
109598
- <option>%</option>
109599
- </select>
110087
+ <button title="${util.out('Clear Breakpoints')}" class="btn-clear-breakpoint" style="margin-top:20px">
110088
+ <svg class="is-icon-flex"><use xlink:href="#icon-trash"></use></svg>
110089
+ <span>${util.out('Clear Breakpoints')}</span>
110090
+ </button>
110091
+
110092
+ <div style="padding-top:23px;padding-bottom:3px;">${util.out('Lock')}:</div>
110093
+
110094
+ <label class="switch"><input id="inpLockBlock" type="checkbox" checked=""><span class="slider round"></span></label>
110095
+
110096
+ <div id="divBlockPos">
110097
+
110098
+ <div class="flex" style="gap:10px">
110099
+ <div>
110100
+ <label for="inpBlockTop" class="flex" style="padding:10px 0 3px;">${util.out('Top')}:</label>
110101
+ <div style="display:flex">
110102
+ <input id="inpBlockTop" class="inp-block-top" type="text" style="width:74px;height:35px">
110103
+ <select id="inpBlockTopUnit">
110104
+ <option></option>
110105
+ <option>px</option>
110106
+ <option>%</option>
110107
+ </select>
110108
+ </div>
109600
110109
  </div>
109601
- </div>
109602
- <div>
109603
- <label for="inpBlockBottom" class="flex" style="padding:10px 0 3px;">${util.out('Bottom')}:</label>
109604
- <div style="display:flex">
109605
- <input id="inpBlockBottom" class="inp-block-top" type="text" style="width:74px;height:35px">
109606
- <select id="inpBlockBottomUnit">
109607
- <option></option>
109608
- <option>px</option>
109609
- <option>%</option>
109610
- </select>
110110
+ <div>
110111
+ <label for="inpBlockBottom" class="flex" style="padding:10px 0 3px;">${util.out('Bottom')}:</label>
110112
+ <div style="display:flex">
110113
+ <input id="inpBlockBottom" class="inp-block-top" type="text" style="width:74px;height:35px">
110114
+ <select id="inpBlockBottomUnit">
110115
+ <option></option>
110116
+ <option>px</option>
110117
+ <option>%</option>
110118
+ </select>
110119
+ </div>
109611
110120
  </div>
109612
110121
  </div>
109613
- </div>
109614
110122
 
109615
- <div class="flex" style="gap:10px">
109616
- <div>
109617
- <label for="inpBlockLeft" class="flex" style="padding:10px 0 3px;">${util.out('Left')}:</label>
109618
- <div style="display:flex">
109619
- <input id="inpBlockLeft" class="inp-block-left" type="text" style="width:74px;height:35px">
109620
- <select id="inpBlockLeftUnit">
109621
- <option></option>
109622
- <option>px</option>
109623
- <option>%</option>
109624
- </select>
110123
+ <div class="flex" style="gap:10px">
110124
+ <div>
110125
+ <label for="inpBlockLeft" class="flex" style="padding:10px 0 3px;">${util.out('Left')}:</label>
110126
+ <div style="display:flex">
110127
+ <input id="inpBlockLeft" class="inp-block-left" type="text" style="width:74px;height:35px">
110128
+ <select id="inpBlockLeftUnit">
110129
+ <option></option>
110130
+ <option>px</option>
110131
+ <option>%</option>
110132
+ </select>
110133
+ </div>
109625
110134
  </div>
109626
- </div>
109627
- <div>
109628
- <label for="inpBlockRight" class="flex" style="padding:10px 0 3px;">${util.out('Right')}:</label>
109629
- <div style="display:flex">
109630
- <input id="inpBlockRight" class="inp-block-left" type="text" style="width:74px;height:35px">
109631
- <select id="inpBlockRightUnit">
109632
- <option></option>
109633
- <option>px</option>
109634
- <option>%</option>
109635
- </select>
110135
+ <div>
110136
+ <label for="inpBlockRight" class="flex" style="padding:10px 0 3px;">${util.out('Right')}:</label>
110137
+ <div style="display:flex">
110138
+ <input id="inpBlockRight" class="inp-block-left" type="text" style="width:74px;height:35px">
110139
+ <select id="inpBlockRightUnit">
110140
+ <option></option>
110141
+ <option>px</option>
110142
+ <option>%</option>
110143
+ </select>
110144
+ </div>
109636
110145
  </div>
109637
110146
  </div>
109638
- </div>
109639
110147
 
109640
- <div class="flex" style="gap:10px">
109641
- <div>
109642
- <label for="inpBlockWidth" class="flex" style="padding:10px 0 3px;">${util.out('Width')}:</label>
109643
- <div style="display:flex">
109644
- <input id="inpBlockWidth" class="inp-block-left" type="text" style="width:74px;height:35px">
109645
- <select id="inpBlockWidthUnit">
109646
- <option></option>
109647
- <option>px</option>
109648
- <option>%</option>
109649
- </select>
110148
+ <div class="flex" style="gap:10px">
110149
+ <div>
110150
+ <label for="inpBlockWidth" class="flex" style="padding:10px 0 3px;">${util.out('Width')}:</label>
110151
+ <div style="display:flex">
110152
+ <input id="inpBlockWidth" class="inp-block-left" type="text" style="width:74px;height:35px">
110153
+ <select id="inpBlockWidthUnit">
110154
+ <option></option>
110155
+ <option>px</option>
110156
+ <option>%</option>
110157
+ </select>
110158
+ </div>
109650
110159
  </div>
109651
- </div>
109652
- <div>
109653
- <label for="inpBlockHeight" class="flex" style="padding:10px 0 3px;">${util.out('Height')}:</label>
109654
- <div style="display:flex">
109655
- <input id="inpBlockHeight" class="inp-block-left" type="text" style="width:74px;height:35px">
109656
- <select id="inpBlockHeightUnit">
109657
- <option></option>
109658
- <option>px</option>
109659
- <option>%</option>
109660
- </select>
110160
+ <div>
110161
+ <label for="inpBlockHeight" class="flex" style="padding:10px 0 3px;">${util.out('Height')}:</label>
110162
+ <div style="display:flex">
110163
+ <input id="inpBlockHeight" class="inp-block-left" type="text" style="width:74px;height:35px">
110164
+ <select id="inpBlockHeightUnit">
110165
+ <option></option>
110166
+ <option>px</option>
110167
+ <option>%</option>
110168
+ </select>
110169
+ </div>
109661
110170
  </div>
109662
110171
  </div>
110172
+
109663
110173
  </div>
109664
110174
 
109665
110175
  </div>
@@ -109761,19 +110271,19 @@ class BlockModal {
109761
110271
  const btnPageBgImage = modal.querySelector('.btn-page-bgimage');
109762
110272
  if (btnPageBgImage) dom.addEventListener(btnPageBgImage, 'click', () => {
109763
110273
  // Background image
109764
- const page = this.getPage();
110274
+ let pageOverlay = this.pageOverlay();
109765
110275
  let src = '';
109766
- if (page) if (page.style.backgroundImage) {
109767
- if (page.style.backgroundImage.indexOf('url(') !== -1) {
109768
- src = page.style.backgroundImage.slice(4, -1).replace(/["']/g, '');
110276
+ if (pageOverlay) if (pageOverlay.style.backgroundImage) {
110277
+ if (pageOverlay.style.backgroundImage.indexOf('url(') !== -1) {
110278
+ src = pageOverlay.style.backgroundImage.slice(4, -1).replace(/["']/g, '');
109769
110279
  }
109770
110280
  }
109771
110281
  this.openImagePicker(src, url => {
109772
- const page = this.getPage();
110282
+ let pageOverlay = this.pageOverlay();
109773
110283
  this.builder.uo.saveForUndo();
109774
- page.style.backgroundImage = `url("${url}")`;
109775
- page.style.backgroundSize = 'cover';
109776
- page.style.backgroundRepeat = 'no-repeat';
110284
+ pageOverlay.style.backgroundImage = `url("${url}")`;
110285
+ pageOverlay.style.backgroundSize = 'cover';
110286
+ pageOverlay.style.backgroundRepeat = 'no-repeat';
109777
110287
  const div = this.pageImagePreview;
109778
110288
  const btnPageAdjust = modal.querySelector('.btn-page-adjust');
109779
110289
  const btnPageClear = modal.querySelector('.btn-page-clear');
@@ -109804,10 +110314,44 @@ class BlockModal {
109804
110314
  });
109805
110315
  const btnPageAdjust = modal.querySelector('.btn-page-adjust');
109806
110316
  btnPageAdjust.addEventListener('click', () => {
109807
- let page = this.getPage();
109808
- this.builder.colTool.openImageAdjust(page, btnPageAdjust);
110317
+ let pageOverlay = this.pageOverlay();
110318
+ this.builder.colTool.openImageAdjust(pageOverlay, btnPageAdjust);
110319
+ });
110320
+ const chkPageGrayscale = modal.querySelector('#chkPageGrayscale');
110321
+ chkPageGrayscale.addEventListener('click', () => {
110322
+ this.builder.uo.saveForUndo();
110323
+ let pageOverlay = this.pageOverlay();
110324
+ const checked = chkPageGrayscale.checked;
110325
+ if (checked) {
110326
+ pageOverlay.style.filter = 'grayscale(1)';
110327
+ } else {
110328
+ if (pageOverlay.style.filter) pageOverlay.style.filter = pageOverlay.style.filter.replace('grayscale(1)', '');
110329
+ }
110330
+ this.builder.onChange();
109809
110331
  });
109810
110332
 
110333
+ // Page Auto Layout
110334
+ const chkAutoLayout = modal.querySelector('#inpAutoLayout');
110335
+ chkAutoLayout.addEventListener(this.builder.isTouchSupport ? 'touchstart' : 'click', () => {
110336
+ const page = this.getPage();
110337
+ if (chkAutoLayout.checked) {
110338
+ page.classList.add('autolayout');
110339
+ } else {
110340
+ page.classList.remove('autolayout');
110341
+ }
110342
+ });
110343
+ if (this.builder.isTouchSupport) {
110344
+ let chkAutoLayoutLabel = chkAutoLayout.parentNode;
110345
+ chkAutoLayoutLabel.addEventListener('touchstart', () => {
110346
+ const page = this.getPage();
110347
+ if (chkAutoLayout.checked) {
110348
+ page.classList.add('autolayout');
110349
+ } else {
110350
+ page.classList.remove('autolayout');
110351
+ }
110352
+ });
110353
+ }
110354
+
109811
110355
  // Block Background Image
109812
110356
 
109813
110357
  this.imagePreview = modal.querySelector('.asset-block-preview');
@@ -109860,7 +110404,7 @@ class BlockModal {
109860
110404
  let blockOverlay = this.blockOverlay();
109861
110405
  this.builder.colTool.openImageAdjust(blockOverlay, btnAdjust);
109862
110406
  });
109863
- const chkGrayscale = modal.querySelector('.chk-grayscale');
110407
+ const chkGrayscale = modal.querySelector('#chkBlockGrayscale');
109864
110408
  chkGrayscale.addEventListener('click', () => {
109865
110409
  this.builder.uo.saveForUndo();
109866
110410
  let blockOverlay = this.blockOverlay();
@@ -110087,6 +110631,62 @@ class BlockModal {
110087
110631
  }
110088
110632
  });
110089
110633
  }
110634
+
110635
+ // Responsive Visibility
110636
+
110637
+ let btns = modal.querySelectorAll('.input-device');
110638
+ btns.forEach(btn => {
110639
+ btn.addEventListener('click', () => {
110640
+ const block = this.blockSelected();
110641
+ let elms = modal.querySelectorAll('.input-device');
110642
+ elms.forEach(elm => {
110643
+ elm.classList.remove('on');
110644
+ });
110645
+ btn.classList.add('on');
110646
+ this.realtimeVisibility(block);
110647
+ });
110648
+ });
110649
+ let btnVisible = modal.querySelector('.input-visible');
110650
+ let btnHidden = modal.querySelector('.input-hidden');
110651
+ btnVisible.addEventListener('click', () => {
110652
+ const block = this.blockSelected();
110653
+ this.builder.uo.saveForUndo();
110654
+ let divTarget = modal.querySelector('.div-target');
110655
+ let target = this.builder.responsive.readTarget(divTarget);
110656
+ if (target === 'xs') {
110657
+ block.classList.remove('xs-hidden');
110658
+ } else if (target === 'sm') {
110659
+ block.classList.remove('sm-hidden');
110660
+ } else if (target === 'md') {
110661
+ block.classList.remove('md-hidden');
110662
+ } else if (target === '') {
110663
+ block.classList.remove('desktop-hidden');
110664
+ }
110665
+ btnVisible.classList.add('on');
110666
+ btnHidden.classList.remove('on');
110667
+ this.builder.opts.onChange();
110668
+ });
110669
+ btnHidden.addEventListener('click', () => {
110670
+ const block = this.blockSelected();
110671
+ this.builder.uo.saveForUndo();
110672
+ let divTarget = modal.querySelector('.div-target');
110673
+ let target = this.builder.responsive.readTarget(divTarget);
110674
+ if (target === 'xs') {
110675
+ block.classList.add('xs-hidden');
110676
+ } else if (target === 'sm') {
110677
+ block.classList.add('sm-hidden');
110678
+ } else if (target === 'md') {
110679
+ block.classList.add('md-hidden');
110680
+ } else if (target === '') {
110681
+ block.classList.add('desktop-hidden');
110682
+ }
110683
+ btnVisible.classList.remove('on');
110684
+ btnHidden.classList.add('on');
110685
+ this.builder.opts.onChange();
110686
+ });
110687
+ new Tabs({
110688
+ element: modal
110689
+ });
110090
110690
  } // constructor
110091
110691
 
110092
110692
  getPage() {
@@ -110118,6 +110718,16 @@ class BlockModal {
110118
110718
  // this.builder.eb.common.applyPercentage(target);
110119
110719
  }
110120
110720
 
110721
+ pageOverlay() {
110722
+ const page = this.getPage();
110723
+ if (!page) return false;
110724
+ let pageOverlay = page.querySelector('.is-page-overlay');
110725
+ if (!pageOverlay) {
110726
+ page.insertAdjacentHTML('afterbegin', '<div class="is-page-overlay"></div>');
110727
+ pageOverlay = page.querySelector('.is-page-overlay');
110728
+ }
110729
+ return pageOverlay;
110730
+ }
110121
110731
  blockOverlay() {
110122
110732
  const block = this.builder.doc.querySelector('.is-block.active:not(.multi)');
110123
110733
  if (!block) return false;
@@ -110134,6 +110744,7 @@ class BlockModal {
110134
110744
  }
110135
110745
  realtime() {
110136
110746
  const modal = this.modal;
110747
+ if (!modal.classList.contains('active')) return;
110137
110748
  const page = this.getPage();
110138
110749
  const block = this.blockSelected();
110139
110750
  if (block) {
@@ -110176,7 +110787,7 @@ class BlockModal {
110176
110787
  }
110177
110788
 
110178
110789
  // Grayscale
110179
- const chkGrayscale = modal.querySelector('.chk-grayscale');
110790
+ const chkGrayscale = modal.querySelector('#chkBlockGrayscale');
110180
110791
  chkGrayscale.checked = false;
110181
110792
  if (blockOverlay) {
110182
110793
  if (blockOverlay.style.filter) {
@@ -110327,23 +110938,38 @@ class BlockModal {
110327
110938
  inpHeight.value = '';
110328
110939
  inpHeightUnit.value = '%';
110329
110940
  }
110941
+ this.realtimeVisibility(block);
110330
110942
  } else if (page) {
110943
+ let pageOverlay = this.pageOverlay();
110944
+
110331
110945
  // Background image
110332
110946
  let src = '';
110333
- if (page) if (page.style.backgroundImage) {
110334
- if (page.style.backgroundImage.indexOf('url(') !== -1) {
110335
- src = page.style.backgroundImage.slice(4, -1).replace(/["']/g, '');
110947
+ if (pageOverlay) if (pageOverlay.style.backgroundImage) {
110948
+ if (pageOverlay.style.backgroundImage.indexOf('url(') !== -1) {
110949
+ src = pageOverlay.style.backgroundImage.slice(4, -1).replace(/["']/g, '');
110336
110950
  }
110337
110951
  }
110338
110952
 
110339
110953
  // Update preview
110340
110954
  this.updatePanelPageImage(src);
110341
110955
 
110342
- // Show/hide
110956
+ // Show/hide grayscale
110957
+ const divPageGrayscale = modal.querySelector('.label-page-grayscale');
110343
110958
  if (src === '') {
110344
110959
  this.pageImagePreview.style.display = 'none';
110960
+ divPageGrayscale.style.display = 'none';
110345
110961
  } else {
110346
110962
  this.pageImagePreview.style.display = '';
110963
+ divPageGrayscale.style.display = '';
110964
+ }
110965
+
110966
+ // Grayscale
110967
+ const chkPageGrayscale = modal.querySelector('#chkPageGrayscale');
110968
+ chkPageGrayscale.checked = false;
110969
+ if (pageOverlay.style.filter) {
110970
+ if (pageOverlay.style.filter.indexOf('grayscale') !== -1) {
110971
+ chkPageGrayscale.checked = true;
110972
+ }
110347
110973
  }
110348
110974
 
110349
110975
  // Background color
@@ -110366,6 +110992,58 @@ class BlockModal {
110366
110992
  } else {
110367
110993
  btnPageGradient.style.backgroundImage = '';
110368
110994
  }
110995
+
110996
+ // Page Auto Layout
110997
+ const chkAutoLayout = modal.querySelector('#inpAutoLayout');
110998
+ if (page.classList.contains('autolayout')) {
110999
+ chkAutoLayout.checked = true;
111000
+ } else {
111001
+ chkAutoLayout.checked = false;
111002
+ }
111003
+ }
111004
+ }
111005
+ realtimeVisibility(row, initialOpen) {
111006
+ if (!this.modal) return;
111007
+ if (initialOpen) {
111008
+ const builderStuff = this.builder.builderStuff;
111009
+ const modal = builderStuff.querySelector('.is-modal.content-preview.active');
111010
+ if (modal) {
111011
+ let elms = this.modal.querySelectorAll('.input-device');
111012
+ elms.forEach(elm => {
111013
+ elm.classList.remove('on');
111014
+ });
111015
+ if (modal.classList.contains('is-screen-1920')) {
111016
+ this.modal.querySelector('.input-device[data-value=""]').classList.add('on');
111017
+ } else if (modal.classList.contains('is-screen-1440')) {
111018
+ this.modal.querySelector('.input-device[data-value=""]').classList.add('on');
111019
+ } else if (modal.classList.contains('is-screen-1024')) {
111020
+ this.modal.querySelector('.input-device[data-value="md"]').classList.add('on');
111021
+ } else if (modal.classList.contains('is-screen-768')) {
111022
+ this.modal.querySelector('.input-device[data-value="sm"]').classList.add('on');
111023
+ } else if (modal.classList.contains('is-screen-375')) {
111024
+ this.modal.querySelector('.input-device[data-value="xs"]').classList.add('on');
111025
+ }
111026
+ }
111027
+ }
111028
+ let divTarget = this.modal.querySelector('.div-target');
111029
+ let divVisibility = this.modal.querySelector('.div-visibility');
111030
+ let target = this.builder.responsive.readTarget(divTarget);
111031
+ let valVisibility = this.builder.responsive.getVisibility(row, target);
111032
+ this.builder.responsive.showVisibility(divVisibility, valVisibility);
111033
+
111034
+ // const divColsPerLine = this.modal.querySelector('.div-colsperline');
111035
+ let btns = this.modal.querySelectorAll('.input-colsperline');
111036
+ btns.forEach(btn => {
111037
+ btn.classList.remove('on');
111038
+ });
111039
+ if (target === 'xs') {
111040
+ if (!initialOpen) this.builder.livePreview.resizePreview(375);
111041
+ } else if (target === 'sm') {
111042
+ if (!initialOpen) this.builder.livePreview.resizePreview(768);
111043
+ } else if (target === 'md') {
111044
+ if (!initialOpen) this.builder.livePreview.resizePreview(1024);
111045
+ } else {
111046
+ if (!initialOpen) this.builder.livePreview.resizePreview(1920);
110369
111047
  }
110370
111048
  }
110371
111049
  openImagePicker(currentUrl, callback, btn) {
@@ -110389,17 +111067,17 @@ class BlockModal {
110389
111067
  }
110390
111068
  updatePageImage(src) {
110391
111069
  this.builder.uo.saveForUndo();
110392
- let page = this.getPage();
110393
- page.style.backgroundImage = 'url(\'' + src + '\')';
111070
+ let pageOverlay = this.pageOverlay();
111071
+ pageOverlay.style.backgroundImage = 'url(\'' + src + '\')';
110394
111072
 
110395
111073
  // Reset position & filter (grayscale)
110396
- page.style.filter = '';
110397
- page.style.backgroundSize = '';
110398
- page.style.backgroundPosition = '50% 60%';
110399
- page.removeAttribute('data-bg-xs');
110400
- page.removeAttribute('data-bg-sm');
110401
- page.removeAttribute('data-bg-md');
110402
- page.removeAttribute('data-bg-lg');
111074
+ pageOverlay.style.filter = '';
111075
+ pageOverlay.style.backgroundSize = '';
111076
+ pageOverlay.style.backgroundPosition = '50% 60%';
111077
+ pageOverlay.removeAttribute('data-bg-xs');
111078
+ pageOverlay.removeAttribute('data-bg-sm');
111079
+ pageOverlay.removeAttribute('data-bg-md');
111080
+ pageOverlay.removeAttribute('data-bg-lg');
110403
111081
  this.updatePanelPageImage(src);
110404
111082
  this.builder.onChange();
110405
111083
  }
@@ -110423,6 +111101,16 @@ class BlockModal {
110423
111101
  }
110424
111102
  const btnPageGradient = modal.querySelector('.btn-page-gradient');
110425
111103
  btnPageGradient.style.backgroundImage = '';
111104
+
111105
+ // Show/hide grayscale
111106
+ const divPageGrayscale = modal.querySelector('.label-page-grayscale');
111107
+ if (src === '') {
111108
+ this.pageImagePreview.style.display = 'none';
111109
+ divPageGrayscale.style.display = 'none';
111110
+ } else {
111111
+ this.pageImagePreview.style.display = '';
111112
+ divPageGrayscale.style.display = '';
111113
+ }
110426
111114
  }
110427
111115
  updateImage(src) {
110428
111116
  this.builder.uo.saveForUndo();
@@ -110438,6 +111126,7 @@ class BlockModal {
110438
111126
  blockOverlay.removeAttribute('data-bg-md');
110439
111127
  blockOverlay.removeAttribute('data-bg-lg');
110440
111128
  this.updatePanelImage(src);
111129
+ this.realtime();
110441
111130
  this.builder.onChange();
110442
111131
  }
110443
111132
  updatePanelImage(src) {
@@ -110460,6 +111149,16 @@ class BlockModal {
110460
111149
  }
110461
111150
  const btnGradient = modal.querySelector('.btn-block-gradient');
110462
111151
  btnGradient.style.backgroundImage = '';
111152
+
111153
+ // Show/hide grayscale
111154
+ const divGrayscale = modal.querySelector('.label-block-grayscale');
111155
+ if (src === '') {
111156
+ this.imagePreview.style.display = 'none';
111157
+ divGrayscale.style.display = 'none';
111158
+ } else {
111159
+ this.imagePreview.style.display = '';
111160
+ divGrayscale.style.display = '';
111161
+ }
110463
111162
  }
110464
111163
  show() {
110465
111164
  const modal = this.modal;
@@ -110490,6 +111189,7 @@ class BlockModal {
110490
111189
  }
110491
111190
  showHideControls() {
110492
111191
  const modal = this.modal;
111192
+ if (!modal.classList.contains('active')) return;
110493
111193
  const content1 = modal.querySelector('.modal-none');
110494
111194
  const content2 = modal.querySelector('.modal-content');
110495
111195
  const content3 = modal.querySelector('.modal-page-content');
@@ -110530,6 +111230,60 @@ class BlockModal {
110530
111230
  this.builder.doc.removeEventListener('click', this.handleBlockClick);
110531
111231
  }
110532
111232
  }
111233
+ position() {
111234
+ const dom = this.dom;
111235
+ let elementTool = this.elementTool;
111236
+ let elementMore = this.elementMore;
111237
+ dom.addClass(elementMore, 'transition1');
111238
+ let elmMore = elementTool.querySelector('.elm-more');
111239
+ const viewportHeight = window.innerHeight;
111240
+
111241
+ /*
111242
+ let top, left;
111243
+ if(!this.builder.iframe) {
111244
+ top = elmMore.getBoundingClientRect().top;
111245
+ left = elmMore.getBoundingClientRect().left;
111246
+ } else {
111247
+ let adjY = this.builder.iframe.getBoundingClientRect().top;
111248
+ let adjX = this.builder.iframe.getBoundingClientRect().left;
111249
+ top = elmMore.getBoundingClientRect().top;
111250
+ left = elmMore.getBoundingClientRect().left;
111251
+ top = top + adjY;
111252
+ left = left + adjX;
111253
+ }
111254
+ */
111255
+ const newPos = this.builder.util.getElementPosition(elmMore);
111256
+ let top = newPos.top;
111257
+ let left = newPos.left;
111258
+
111259
+ // elementMore.style.display = 'flex';
111260
+ const btnMore = elementTool.querySelector('.elm-more');
111261
+ this.util.showPop(elementMore, false, btnMore);
111262
+ const w = elementMore.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
111263
+ const h = elementMore.offsetHeight;
111264
+ if (viewportHeight - top > h) {
111265
+ elementMore.style.top = top + window.pageYOffset + 27 + 'px';
111266
+ elementMore.style.left = left - w / 2 + 10 + 'px';
111267
+ dom.removeClass(elementMore, 'arrow-bottom');
111268
+ dom.removeClass(elementMore, 'arrow-right');
111269
+ dom.removeClass(elementMore, 'arrow-left');
111270
+ dom.removeClass(elementMore, 'center');
111271
+ dom.addClass(elementMore, 'arrow-top');
111272
+ dom.addClass(elementMore, 'center');
111273
+ } else {
111274
+ elementMore.style.top = top + window.pageYOffset - h - 8 + 'px';
111275
+ elementMore.style.left = left - w / 2 + 10 + 'px';
111276
+ dom.removeClass(elementMore, 'arrow-top');
111277
+ dom.removeClass(elementMore, 'arrow-right');
111278
+ dom.removeClass(elementMore, 'arrow-left');
111279
+ dom.removeClass(elementMore, 'center');
111280
+ dom.addClass(elementMore, 'arrow-bottom');
111281
+ dom.addClass(elementMore, 'center');
111282
+ }
111283
+ setTimeout(() => {
111284
+ dom.removeClass(elementMore, 'transition1');
111285
+ }, 300);
111286
+ }
110533
111287
  }
110534
111288
 
110535
111289
  class PageSize {
@@ -110662,12 +111416,19 @@ class PageSize {
110662
111416
  // let h = arr[1].trim();
110663
111417
  if (arr.length === 3) {
110664
111418
  // web
110665
- const docWidth = docContainer.offsetWidth;
110666
- const viewportWidth = this.builder.win.innerWidth;
110667
- if (docWidth < viewportWidth - 50) {
110668
- // web (container)
110669
- docContainer.classList.remove('page-web');
110670
- docContainer.classList.add('page-web-container');
111419
+ let box = docContainer.querySelector('.is-box');
111420
+ if (box) {
111421
+ const boxWidth = box.offsetWidth;
111422
+ const viewportWidth = this.builder.win.innerWidth;
111423
+ if (boxWidth < viewportWidth - 50) {
111424
+ // web (container)
111425
+ docContainer.classList.remove('page-web');
111426
+ docContainer.classList.add('page-web-container');
111427
+ } else {
111428
+ // web (full)
111429
+ docContainer.classList.remove('page-web-container');
111430
+ docContainer.classList.add('page-web');
111431
+ }
110671
111432
  } else {
110672
111433
  // web (full)
110673
111434
  docContainer.classList.remove('page-web-container');
@@ -110756,18 +111517,53 @@ class PageSize {
110756
111517
  position: relative;
110757
111518
  flex:none;
110758
111519
  background: #fff;
110759
- overflow: hidden;
111520
+ /* overflow: hidden;*/
110760
111521
  box-shadow: none;
110761
111522
  }
110762
111523
  ${css}
110763
111524
  </style>
111525
+
111526
+ ${html.includes('data-module="codeview"') ? `
111527
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/themes/prism.min.css" rel="stylesheet">
111528
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/themes/prism-coy.min.css" rel="stylesheet">
111529
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/prism.min.js"></script>
111530
+ <style>
111531
+ :not(pre)>code[class*=language-], pre[class*=language-] {
111532
+ background-color: #f4f4f4 !important;
111533
+ padding: 12px 16px !important;
111534
+ }
111535
+ pre[class*=language-]:after, pre[class*=language-]:before {
111536
+ box-shadow: none;
111537
+ }
111538
+ :not(pre)>code[class*=language-], pre[class*=language-] {
111539
+ margin-bottom: 1.2rem;
111540
+ }
111541
+ div[data-html] {
111542
+ min-height: 40px;
111543
+ }
111544
+ code[class*=language-], pre[class*=language-] {
111545
+ text-shadow: none;
111546
+ }
111547
+ </style>
111548
+ ` : ''}
110764
111549
  </head>
110765
111550
  <body class="print">
110766
111551
 
110767
111552
  <div class="is-page">${html}</div>
110768
111553
 
110769
111554
  <script>
110770
- window.print();
111555
+ var docReady = function(fn) {
111556
+ var stateCheck = setInterval(function() {
111557
+ if (document.readyState !== "complete") return;
111558
+ clearInterval(stateCheck);
111559
+ try {
111560
+ fn()
111561
+ } catch (e) {}
111562
+ }, 1);
111563
+ };
111564
+ docReady(function() {
111565
+ window.print();
111566
+ });
110771
111567
  </script>
110772
111568
  </body>
110773
111569
  </html>
@@ -110852,6 +111648,9 @@ class PageSize {
110852
111648
  width: ${docWidth};
110853
111649
  height: ${docHeight};
110854
111650
  }
111651
+ .hide-on-print {
111652
+ display: none !important;
111653
+ }
110855
111654
  }
110856
111655
  @page {
110857
111656
  size:${docWidth} ${docHeight};;
@@ -110872,6 +111671,9 @@ class PageSize {
110872
111671
  width: ${w};
110873
111672
  height: ${h};
110874
111673
  }
111674
+ .hide-on-print {
111675
+ display: none !important;
111676
+ }
110875
111677
  }
110876
111678
  @page {
110877
111679
  size:${w} ${h};
@@ -111141,7 +111943,7 @@ class ContentBuilder {
111141
111943
  style: 'width:180px;height:112.5px'
111142
111944
  }, {
111143
111945
  title: 'Web (container)',
111144
- pagesize: '800px,1000px,web',
111946
+ pagesize: '1000px,1000px,web',
111145
111947
  style: 'width:180px;height:112.5px'
111146
111948
  }, {
111147
111949
  title: '8.27x5.52',
@@ -111982,6 +112784,12 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
111982
112784
  if (window.data_basic) {
111983
112785
  // if snippet file included
111984
112786
  this.opts.snippetJSON = window.data_basic;
112787
+ if (!this.canvas) for (let i = this.opts.snippetJSON.snippets.length - 1; i >= 0; i--) {
112788
+ if (this.opts.snippetJSON.snippets[i].mode === 'canvas') {
112789
+ this.opts.snippetJSON.snippets.splice(i, 1);
112790
+ }
112791
+ }
112792
+
111985
112793
  // if snippetPath is specified (not empty), then use the specified. Otherwise, use the one generated from snippet file (_snippets_path)
111986
112794
  if (this.opts.snippetPath === '') {
111987
112795
  this.opts.snippetPath = window._snippets_path;
@@ -112029,12 +112837,12 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
112029
112837
  // this.iconButtons = ['icon', 'color','textsettings', 'createLink','|', 'undo', 'redo', 'aiassistant', 'snippets', 'pageoptions', 'print', 'zoom', 'html'];
112030
112838
  // this.iconButtonsMore = [];
112031
112839
 
112032
- this.buttons = ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'html', 'zoom', 'more'];
112033
- this.buttonsMore = ['icon', 'image', '|', 'list', 'font', 'formatPara', '|', 'aiassistant', 'snippets', 'pageoptions', 'print', 'preferences'];
112034
- this.elementButtons = ['front', 'backward', 'moveup', 'movedown', 'group', 'ungroup', 'duplicate', 'delete', 'left', 'center', 'right', 'full', 'undo', 'redo', 'blocksettings', 'html', 'zoom', 'more'];
112035
- this.elementButtonsMore = ['aiassistant', 'snippets', 'pageoptions', 'print', 'preferences'];
112036
- this.iconButtons = ['icon', 'color', 'textsettings', 'createLink', '|', 'undo', 'redo', 'html', 'zoom', 'more'];
112037
- this.iconButtonsMore = ['aiassistant', 'snippets', 'pageoptions', 'print', 'preferences'];
112840
+ this.buttons = ['bold', 'italic', 'underline', 'formatting', 'color', 'align', 'textsettings', 'createLink', 'tags', '|', 'undo', 'redo', 'zoom', 'pageoptions', 'print', 'html', 'more'];
112841
+ this.buttonsMore = ['icon', 'image', '|', 'list', 'font', 'formatPara', '|', 'aiassistant', 'snippets', 'preferences'];
112842
+ this.elementButtons = ['front', 'backward', 'moveup', 'movedown', 'group', 'ungroup', 'duplicate', 'delete', 'left', 'center', 'right', 'full', 'undo', 'redo', 'blocksettings', 'zoom', 'pageoptions', 'print', 'html', 'more'];
112843
+ this.elementButtonsMore = ['aiassistant', 'snippets', 'preferences'];
112844
+ this.iconButtons = ['icon', 'color', 'textsettings', 'createLink', '|', 'undo', 'redo', 'zoom', 'pageoptions', 'print', 'html', 'more'];
112845
+ this.iconButtonsMore = ['aiassistant', 'snippets', 'preferences'];
112038
112846
  if (!this.docContainer && this.container !== '.is-container') {
112039
112847
  this.docContainer = this.container;
112040
112848
  this.container = '.is-container';
@@ -112546,6 +113354,11 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
112546
113354
  this.rte.hideBlockButtons();
112547
113355
  this.rte.positionToolbar();
112548
113356
  }
113357
+ if (this.blockmodal) {
113358
+ setTimeout(() => {
113359
+ this.blockmodal.showHideControls();
113360
+ }, 30);
113361
+ }
112549
113362
  },
112550
113363
  onSelectBlock: block => {
112551
113364
  if (this.onSelectBlock) this.onSelectBlock(block);
@@ -112701,6 +113514,57 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
112701
113514
  }
112702
113515
  }
112703
113516
  });
113517
+
113518
+ // Copy & Paste Block
113519
+ document.addEventListener('keydown', e => {
113520
+ if ((e.ctrlKey || e.metaKey) && e.which === 67) {
113521
+ //CTRL-C
113522
+ const activeBlock = docContainer.querySelector('.is-block.active'); // always get .cloned
113523
+ if (activeBlock) {
113524
+ this.copyBlock = activeBlock;
113525
+ }
113526
+ }
113527
+ });
113528
+ document.addEventListener('keydown', e => {
113529
+ if ((e.ctrlKey || e.metaKey) && e.which === 86) {
113530
+ //CTRL-V
113531
+
113532
+ const box = docContainer.querySelector('.is-box.box-select'); // always get .cloned
113533
+ let block = this.copyBlock;
113534
+ if (box && block) {
113535
+ if (document.querySelector('.is-modal.active:not(.is-modal-content)')) return;
113536
+ const focusedElement = e.target;
113537
+ const isEditable = focusedElement.tagName === 'INPUT' || focusedElement.tagName === 'TEXTAREA' || focusedElement.hasAttribute('contenteditable');
113538
+ if (isEditable) return;
113539
+ this.uo.saveForUndo();
113540
+ let block = this.copyBlock;
113541
+ const builder = block.querySelector(this.container);
113542
+ let html = '';
113543
+ if (builder) {
113544
+ html = this.readHtml(builder);
113545
+ }
113546
+ let clonedDiv = block.cloneNode(true);
113547
+ clonedDiv.style.top = '20%';
113548
+ clonedDiv.style.left = '20%';
113549
+ if (builder) {
113550
+ const cloneBuilder = clonedDiv.querySelector(this.container);
113551
+ cloneBuilder.innerHTML = '';
113552
+ box.appendChild(clonedDiv);
113553
+ const range = document.createRange();
113554
+ cloneBuilder.appendChild(range.createContextualFragment(html));
113555
+ this.applyBehaviorOn(cloneBuilder);
113556
+ cloneBuilder.click();
113557
+ } else {
113558
+ block.parentNode.appendChild(clonedDiv);
113559
+ }
113560
+ block.classList.remove('active');
113561
+ this.doc.querySelectorAll('.clone').forEach(elm => elm.parentNode.removeChild(elm));
113562
+ this.doc.querySelectorAll('.cloned').forEach(elm => elm.classList.remove('cloned'));
113563
+ this.eb.refresh();
113564
+ this.opts.onChange();
113565
+ }
113566
+ }
113567
+ });
112704
113568
  }
112705
113569
  let previousWidth = this.win.innerWidth;
112706
113570
  let timer;
@@ -113130,6 +113994,22 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
113130
113994
  top: 0;
113131
113995
  left: -1000px;
113132
113996
  }
113997
+ .h-ruler {
113998
+ top:0;
113999
+ left:-100vw;
114000
+ width: 300vw;
114001
+ height:2px;
114002
+ display:none;
114003
+ }
114004
+ .h-ruler.active { display: block }
114005
+ .v-ruler {
114006
+ top:0;
114007
+ left:0;
114008
+ width:2px;
114009
+ height: 100%;
114010
+ display:none;
114011
+ }
114012
+ .v-ruler.active { display: block }
113133
114013
 
113134
114014
  /* Resize Handles */
113135
114015
  .handle {
@@ -113304,16 +114184,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
113304
114184
  @media (max-width: 760px) {
113305
114185
  .is-box.autolayout .is-block > .rotate-handle,
113306
114186
  .is-box.autolayout .is-block > .handle {
113307
- display: none;
114187
+ display: none;
113308
114188
  }
113309
114189
 
113310
114190
  /* NEW */
113311
- .is-block.clone {
114191
+ .is-box.autolayout .is-block.clone {
113312
114192
  display:none;
113313
114193
  }
113314
- .is-block.cloned {
114194
+ .is-box.autolayout .is-block.cloned {
113315
114195
  outline: var(--is-outline);
113316
114196
  }
114197
+ .is-box.box-select {
114198
+ outline: none !important;
114199
+ }
113317
114200
  }
113318
114201
 
113319
114202
  .is-block.locked .handle,
@@ -113980,7 +114863,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
113980
114863
  this.setZoomOnControl(builder);
113981
114864
  }
113982
114865
  html(area) {
113983
- if (this.docContainer) {
114866
+ if (this.docContainer && !area) {
113984
114867
  // freeform
113985
114868
 
113986
114869
  const docContainer = this.doc.querySelector(this.docContainer);
@@ -114088,7 +114971,33 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
114088
114971
  }
114089
114972
  refresh() {
114090
114973
  if (this.eb) this.eb.refresh();
114974
+
114975
+ /*
114976
+ // Add block tool
114977
+ let html = `
114978
+ <div class="is-tool is-block-tool">
114979
+ <button type="button" tabindex="-1" title="${this.util.out('Settings')}" class="block-settings"><svg class="is-icon-flex"><use xlink:href="#icon-settings"></use></svg></button>
114980
+ </div>
114981
+ `;
114982
+ let blocks = this.doc.querySelectorAll('.is-block');
114983
+ blocks.forEach(block => {
114984
+ let tool = block.querySelector('.is-block-tool');
114985
+ if(tool) tool.remove();
114986
+ block.insertAdjacentHTML('beforeend', html);
114987
+ tool = block.querySelector('.is-block-tool');
114988
+ tool.addEventListener('click',(e)=>{
114989
+ if(document.querySelector('.is-modal.editblock.active')) {
114990
+ this.blockmodal.hide();
114991
+ } else {
114992
+ this.blockmodal.show();
114993
+ }
114994
+ e.preventDefault();
114995
+ e.stopImmediatePropagation();
114996
+ });
114997
+ });
114998
+ */
114091
114999
  }
115000
+
114092
115001
  group() {
114093
115002
  if (!this.eb) return;
114094
115003
  this.uo.saveForUndo();
@@ -114243,6 +115152,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
114243
115152
  <!--
114244
115153
  <button type="button" tabindex="-1" class="box-settings" title="${this.util.out('Settings')}"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>
114245
115154
  -->
115155
+ <button type="button" tabindex="-1" class="box-duplicate" title="${this.util.out('Duplicate')}"><svg class="is-icon-flex" style="width:14px;height:14px"><use xlink:href="#icon-duplicate"></use></svg></button>
114246
115156
  <button type="button" tabindex="-1" class="box-remove" title="${this.util.out('Remove')}"><svg class="is-icon-flex"><use xlink:href="#icon-trash"></use></svg></button>
114247
115157
  </div>
114248
115158
  <div class="is-tool is-canvasadd-tool" style="transform: scale(1); transform-origin: center top;">
@@ -114293,6 +115203,57 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
114293
115203
  });
114294
115204
  this.opts.onChange();
114295
115205
  });
115206
+ const btnDuplicate = box.querySelector('.is-canvas-tool .box-duplicate');
115207
+ btnDuplicate.addEventListener('click', e => {
115208
+ this.eb.selectClear(); // clear clone
115209
+
115210
+ // clear active
115211
+ const box = e.target.closest('.is-box');
115212
+ const block = box.querySelector('.is-block.active');
115213
+ if (block) block.classList.remove('active');
115214
+ this.uo.saveForUndo();
115215
+ let copiedBox = box.cloneNode(true);
115216
+ copiedBox.setAttribute('data-box-copied', '1');
115217
+ let parent = box.parentNode;
115218
+ parent.insertBefore(copiedBox, box.nextElementSibling);
115219
+ let newBox = docContainer.querySelector('[data-box-copied]');
115220
+ newBox.removeAttribute('data-box-copied');
115221
+
115222
+ // Code Blocks Handling
115223
+ let codeBlocks = newBox.querySelectorAll('[data-module]');
115224
+ codeBlocks.forEach(element => {
115225
+ let html = decodeURIComponent(element.getAttribute('data-html')); // Original code is stored in data-html attribute
115226
+ html = html.replace(/{id}/g, this.util.makeId());
115227
+ //Fill the block with original code
115228
+ this.html(element, html);
115229
+ });
115230
+ newBox.scrollIntoView({
115231
+ behavior: 'smooth',
115232
+ block: 'center'
115233
+ });
115234
+ this.applyBehaviorCanvas();
115235
+
115236
+ // ContentBuilder Handling
115237
+ let containers = newBox.querySelectorAll('.is-builder');
115238
+ containers.forEach(container => {
115239
+ let containerHtml = this.html(container);
115240
+ let range = document.createRange();
115241
+ container.innerHTML = '';
115242
+ container.appendChild(range.createContextualFragment(containerHtml));
115243
+ container.removeAttribute('data-sort'); //important (ContentBuilder cleanup for the container)
115244
+ this.applyBehaviorOn(container);
115245
+ });
115246
+ this.eb.refresh();
115247
+ this.opts.onChange();
115248
+
115249
+ // Change selection
115250
+ setTimeout(() => {
115251
+ box.classList.remove('box-select');
115252
+ const prevBox = docContainer.querySelector('.box-select');
115253
+ if (prevBox) prevBox.classList.remove('box-select');
115254
+ newBox.classList.add('box-select');
115255
+ }, 30);
115256
+ });
114296
115257
  const btnRemove = box.querySelector('.is-canvas-tool .box-remove');
114297
115258
  btnRemove.addEventListener('click', e => {
114298
115259
  const box = e.target.closest('.is-box');
@@ -115359,6 +116320,12 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
115359
116320
  script.async = true;
115360
116321
  script.onload = () => {
115361
116322
  this.opts.snippetJSON = window.data_basic;
116323
+ if (!this.canvas) for (let i = this.opts.snippetJSON.snippets.length - 1; i >= 0; i--) {
116324
+ if (this.opts.snippetJSON.snippets[i].mode === 'canvas') {
116325
+ this.opts.snippetJSON.snippets.splice(i, 1);
116326
+ }
116327
+ }
116328
+
115362
116329
  // if snippetPath is specified (not empty), then use the specified. Otherwise, use the one generated from snippet file (_snippets_path)
115363
116330
  if (this.opts.snippetPath === '') {
115364
116331
  this.opts.snippetPath = window._snippets_path;
@@ -115385,7 +116352,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
115385
116352
  html = `
115386
116353
  <div class="is-box box-canvas autolayout">
115387
116354
  <div class="is-block block-steady height-auto" style="top: calc(50% - 357px); left: calc(50% - 348px); width: 696px;" data--t="calc(50% - 357px)" data--l="calc(50% - 348px)" data--b="" data--r="" data--w="696px" data--h="">
115388
- <div class="is-container leading-12 size-17">
116355
+ <div class="is-container">
115389
116356
  ${html}
115390
116357
  </div>
115391
116358
  <div class="is-block-overlay"></div>
@@ -116957,6 +117924,13 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
116957
117924
 
116958
117925
  if (this.opts.emailMode) bSnippet = false;
116959
117926
 
117927
+ // check if is block
117928
+ let isBlock = false;
117929
+ if (html.includes('"is-block')) {
117930
+ isBlock = true;
117931
+ bSnippet = false;
117932
+ }
117933
+
116960
117934
  // Convert snippet into your defined 12 columns grid
116961
117935
  var rowClass = this.opts.row; //row
116962
117936
  var colClass = this.opts.cols; //['col s1', 'col s2', 'col s3', 'col s4', 'col s5', 'col s6', 'col s7', 'col s8', 'col s9', 'col s10', 'col s11', 'col s12']
@@ -117003,24 +117977,26 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
117003
117977
  this.dom.removeClass(itemEl, 'snippet-item');
117004
117978
  let bw = '';
117005
117979
  if (this.page && this.page === '.is-wrapper') {
117006
- bw = '800px';
117980
+ bw = '760px';
117007
117981
  } else {
117008
117982
  if (occurrences === 2) {
117009
- bw = '800px';
117983
+ bw = '760px';
117010
117984
  } else if (occurrences >= 3) {
117011
- bw = '800px';
117985
+ bw = '760px';
117012
117986
  } else {
117013
117987
  bw = '540px';
117014
117988
  }
117015
117989
  }
117016
117990
  const blockTemplate = `
117017
117991
  <div class="is-block block-steady height-auto" data-new-dummy="1" style="top: 20%; left: 20%; width: ${bw};">
117018
- <div class="is-container container-new leading-12 size-17">
117992
+ <div class="is-container container-new">
117019
117993
  [%CONTENT%]
117020
117994
  </div>
117021
117995
  </div>
117022
117996
  `; // data-new-dummy will be used by onSort to apply top/left position (snippetpanel.js)
117023
117997
  itemEl.outerHTML = blockTemplate.replace('[%CONTENT%]', html);
117998
+ } else if (isBlock) {
117999
+ itemEl.outerHTML = html;
117024
118000
  } else {
117025
118001
  // Snippet is wrapped in row/colum (may contain custom code or has [data-html] attribute)
117026
118002
  // Can only be inserted after current row or last row (not on column or element).
@@ -117053,19 +118029,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
117053
118029
  itemEl.appendChild(range.createContextualFragment(html));
117054
118030
  let bw = '';
117055
118031
  if (this.page && this.page === '.is-wrapper') {
117056
- bw = '800px';
118032
+ bw = '760px';
117057
118033
  } else {
117058
118034
  if (occurrences === 2) {
117059
- bw = '800px';
118035
+ bw = '760px';
117060
118036
  } else if (occurrences >= 3) {
117061
- bw = '800px';
118037
+ bw = '760px';
117062
118038
  } else {
117063
118039
  bw = '540px';
117064
118040
  }
117065
118041
  }
117066
118042
  const blockTemplate = `
117067
118043
  <div class="is-block block-steady height-auto" data-new-dummy="1" style="top: 20%; left: 20%; width: ${bw};">
117068
- <div class="is-container container-new leading-12 size-17">
118044
+ <div class="is-container container-new">
117069
118045
  [%CONTENT%]
117070
118046
  </div>
117071
118047
  </div>
@@ -148822,14 +149798,19 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
148822
149798
  .is-box.autolayout .is-block > .handle {
148823
149799
  display: none;
148824
149800
  }
148825
-
149801
+
148826
149802
  /* NEW */
148827
- .is-block.clone {
149803
+ .is-box.autolayout .is-block.clone {
148828
149804
  display:none;
148829
149805
  }
148830
- .is-block.cloned {
149806
+ .is-box.autolayout .is-block.cloned {
148831
149807
  outline: var(--is-outline);
148832
149808
  }
149809
+ /*
149810
+ .is-box.box-select {
149811
+ outline: none !important;
149812
+ }
149813
+ */
148833
149814
  }
148834
149815
 
148835
149816
  .is-block.locked .handle,