| 1 |
/*! elementor - v3.30.0 - 10-06-2025 */ |
| 2 |
"use strict"; |
| 3 |
(self["webpackChunkelementorFrontend"] = self["webpackChunkelementorFrontend"] || []).push([["shared-editor-handlers"],{ |
| 4 |
|
| 5 |
/***/ "../assets/dev/js/frontend/handlers/handles-position.js": |
| 6 |
/*!**************************************************************!*\ |
| 7 |
!*** ../assets/dev/js/frontend/handlers/handles-position.js ***! |
| 8 |
\**************************************************************/ |
| 9 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
Object.defineProperty(exports, "__esModule", ({ |
| 14 |
value: true |
| 15 |
})); |
| 16 |
exports["default"] = void 0; |
| 17 |
__webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ "../node_modules/core-js/modules/esnext.iterator.constructor.js"); |
| 18 |
__webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ "../node_modules/core-js/modules/esnext.iterator.find.js"); |
| 19 |
const handlesInsideClass = 'e-handles-inside'; |
| 20 |
const handlesHeight = 25; |
| 21 |
class HandlesPosition extends elementorModules.frontend.handlers.Base { |
| 22 |
onInit() { |
| 23 |
this.$element.on('mouseenter', this.setHandlesPosition.bind(this)); |
| 24 |
} |
| 25 |
isSectionScrollSnapEnabled() { |
| 26 |
return elementor.settings.page.model.attributes.scroll_snap; |
| 27 |
} |
| 28 |
isFirstElement() { |
| 29 |
return this.$element[0] === document.querySelector('.elementor-section-wrap > .elementor-element:first-child'); |
| 30 |
} |
| 31 |
isOverflowHidden() { |
| 32 |
return 'hidden' === this.$element.css('overflow'); |
| 33 |
} |
| 34 |
getOffset() { |
| 35 |
if ('body' === elementor.config.document.container) { |
| 36 |
return this.$element.offset().top; |
| 37 |
} |
| 38 |
const $container = jQuery(elementor.config.document.container); |
| 39 |
return this.$element.offset().top - $container.offset().top; |
| 40 |
} |
| 41 |
setHandlesPosition() { |
| 42 |
const document = elementor.documents.getCurrent(); |
| 43 |
if (!document || !document.container.isEditable()) { |
| 44 |
return; |
| 45 |
} |
| 46 |
if (this.isSectionScrollSnapEnabled()) { |
| 47 |
this.$element.addClass(handlesInsideClass); |
| 48 |
return; |
| 49 |
} |
| 50 |
if (!this.isOverflowHidden() && !this.isFirstElement()) { |
| 51 |
this.$element.removeClass(handlesInsideClass); |
| 52 |
return; |
| 53 |
} |
| 54 |
const offset = this.getOffset(), |
| 55 |
$handlesElement = this.$element.find('> .elementor-element-overlay > .elementor-editor-section-settings'); |
| 56 |
if (offset < handlesHeight) { |
| 57 |
this.$element.addClass(handlesInsideClass); |
| 58 |
$handlesElement.css('top', offset < -5 ? -offset : ''); |
| 59 |
} else { |
| 60 |
this.$element.removeClass(handlesInsideClass); |
| 61 |
} |
| 62 |
} |
| 63 |
} |
| 64 |
exports["default"] = HandlesPosition; |
| 65 |
|
| 66 |
/***/ }) |
| 67 |
|
| 68 |
}]); |
| 69 |
//# sourceMappingURL=shared-editor-handlers.22c8f376e58bdba40f71.bundle.js.map |