@madj2k/fe-frontend-kit 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -329,6 +329,9 @@ class Madj2kFlyoutMenu {
|
|
|
329
329
|
* Resizes the menu based on height mode and inner content
|
|
330
330
|
*/
|
|
331
331
|
resizeMenu() {
|
|
332
|
+
const refObj = this.settings.$positionReference || this.$element;
|
|
333
|
+
const refPos = refObj.getBoundingClientRect();
|
|
334
|
+
const flyoutTop = refPos.top + refObj.offsetHeight;
|
|
332
335
|
let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
|
|
333
336
|
|
|
334
337
|
if ('fullHeight' in this.settings) {
|
|
@@ -339,7 +342,7 @@ class Madj2kFlyoutMenu {
|
|
|
339
342
|
if (this.settings.heightMode === 'full' || this.settings.fullHeight === true) {
|
|
340
343
|
const viewPortHeight = window.innerHeight;
|
|
341
344
|
if (height < viewPortHeight) {
|
|
342
|
-
height = viewPortHeight;
|
|
345
|
+
height = viewPortHeight - flyoutTop;
|
|
343
346
|
}
|
|
344
347
|
this.settings.$menu.style.height = `${height}px`;
|
|
345
348
|
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -67,6 +67,7 @@ This class toggles the visibility of any target element referenced by the `aria-
|
|
|
67
67
|
attribute of a trigger element (button, link, etc.). It manages ARIA attributes for accessibility
|
|
68
68
|
and allows overlays to be closed externally via a custom event.
|
|
69
69
|
|
|
70
|
+
|
|
70
71
|
# Flyout-Navigation
|
|
71
72
|
## Usage
|
|
72
73
|
Integrate the CSS- and JS-file into your project. Make sure jQuery is included.
|