@madj2k/fe-frontend-kit 2.0.6 → 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,22 +329,20 @@ 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;
335
- let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
336
-
337
332
  if ('fullHeight' in this.settings) {
338
333
  console.warn('Option "fullHeight" is deprecated. Please use "heightMode" instead.');
339
334
  }
340
335
 
336
+ let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
337
+
341
338
  // heightMode "full" with deprecated fullHeight-setting as fallback
342
339
  if (this.settings.heightMode === 'full' || this.settings.fullHeight === true) {
343
340
  const viewPortHeight = window.innerHeight;
344
341
  if (height < viewPortHeight) {
345
- height = viewPortHeight - flyoutTop;
342
+ this.settings.$menu.style.height = `100vh`;
343
+ } else {
344
+ this.settings.$menu.style.height = `${height}px`;
346
345
  }
347
- this.settings.$menu.style.height = `${height}px`;
348
346
 
349
347
  } else if (this.settings.heightMode === 'maxContent') {
350
348
  this.settings.$menu.style.height = `max-content`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madj2k/fe-frontend-kit",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Shared frontend utilities, menus and mixins for projects",
5
5
  "main": "index.js",
6
6
  "style": "index.scss",