Skip to content

Commit

Permalink
Fixed scene navigation collapsed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Sep 10, 2021
1 parent 0f7d045 commit 21b483d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.0.7
* Bugfix: Fixed scene navigation collapsed mode broken in Foundry 0.8.9 (Thanks Merudo)

### 1.0.6
* Bugfix: Chat logs should not expand the sidebar when collapsed by default (Thanks Brimcon)

Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Minimal UI",
"author": "JeansenVaars#2857",
"description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.",
"version": "1.0.6",
"version": "1.0.7",
"minimumCoreVersion": "0.8.9",
"compatibleCoreVersion": "0.8.9",
"dependencies": [
Expand All @@ -25,5 +25,5 @@
],
"url": "https://github.com/saif-ellafi/foundryvtt-minimal-ui.git",
"manifest": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/latest/download/module.json",
"download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.0.6/foundryvtt-minimal-ui_1.0.6.zip"
"download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.0.7/foundryvtt-minimal-ui_1.0.7.zip"
}
8 changes: 5 additions & 3 deletions modules/component/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default class MinimalUINavigation {
static cssSceneNavSmallLogoStart = '75px';
static cssSceneNavBullseyeStart = '125px';

static collapseNavigation(toggleId) {
let target = document.getElementById(toggleId);
static collapseNavigation() {
let target = document.getElementById("nav-toggle");
if (target) {
target.click();
}
Expand Down Expand Up @@ -60,8 +60,10 @@ export default class MinimalUINavigation {

switch(game.settings.get('minimal-ui', 'sceneNavigation')) {
case 'collapsed': {
await new Promise(waitABit => setTimeout(waitABit, 10));
MinimalUINavigation.collapseNavigation();
await new Promise(waitABit => setTimeout(waitABit, 250));
rootStyle.setProperty('--navivis', 'visible');
MinimalUINavigation.collapseNavigation("nav-toggle");
break;
}
case 'shown': {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foundryvtt-minimal-ui",
"version": "1.0.6",
"version": "1.0.7",
"description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.",
"main": "minimalui.js",
"scripts": {
Expand Down

0 comments on commit 21b483d

Please sign in to comment.