From 7ba0b91915205896dd933b74d8b0658d01e7090e Mon Sep 17 00:00:00 2001 From: Moros Smith Date: Sun, 9 Jun 2024 01:33:09 -0400 Subject: [PATCH] fix default layout button handler --- CHANGELOG.md | 1 + resources/js/app.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c18721..b2d2b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ It is a summary of changes that would be pertinent to the end user of the PGEtin ## 2024-06-09 - Fixed [Issue #92](https://github.com/Moros1138/PGEtinker/issues/92) +- Fixed default layout button handler ## 2024-06-08 diff --git a/resources/js/app.js b/resources/js/app.js index d3a8ddc..63f6661 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -97,7 +97,14 @@ class PGEtinker event.preventDefault(); this.layout.destroy(); - this.layoutConfig = defaultLayout; + + this.layoutConfig = defaultLandscapeLayout; + + if(document.body.clientWidth <= 750) + { + console.log("chose portrait layout"); + this.layoutConfig = defaultPortraitLayout; + } this.SetupLayout(); });