@madj2k/fe-frontend-kit 2.0.5 → 2.0.7
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,19 +329,20 @@ class Madj2kFlyoutMenu {
|
|
|
329
329
|
* Resizes the menu based on height mode and inner content
|
|
330
330
|
*/
|
|
331
331
|
resizeMenu() {
|
|
332
|
-
let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
|
|
333
|
-
|
|
334
332
|
if ('fullHeight' in this.settings) {
|
|
335
333
|
console.warn('Option "fullHeight" is deprecated. Please use "heightMode" instead.');
|
|
336
334
|
}
|
|
337
335
|
|
|
336
|
+
let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
|
|
337
|
+
|
|
338
338
|
// heightMode "full" with deprecated fullHeight-setting as fallback
|
|
339
339
|
if (this.settings.heightMode === 'full' || this.settings.fullHeight === true) {
|
|
340
340
|
const viewPortHeight = window.innerHeight;
|
|
341
341
|
if (height < viewPortHeight) {
|
|
342
|
-
height =
|
|
342
|
+
this.settings.$menu.style.height = `100vh`;
|
|
343
|
+
} else {
|
|
344
|
+
this.settings.$menu.style.height = `${height}px`;
|
|
343
345
|
}
|
|
344
|
-
this.settings.$menu.style.height = `${height}px`;
|
|
345
346
|
|
|
346
347
|
} else if (this.settings.heightMode === 'maxContent') {
|
|
347
348
|
this.settings.$menu.style.height = `max-content`;
|
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.
|