From cc86348983e0c14a47c0b46c32d0e84a3acdf356 Mon Sep 17 00:00:00 2001 From: Davis Haupt Date: Sun, 27 Feb 2022 22:51:31 -0500 Subject: [PATCH] fix height on mobile --- package.json | 2 +- src/view.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b2a0404..acf8c1a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "version": "node version-bump.mjs && git add manifest.json versions.json", "lint": "prettier --check src/**/*.ts*", "fix": "prettier --write src/**/*.ts*", - "compile": "tsc -noEmit", + "compile": "tsc -noEmit --skipLibCheck", "prepare": "husky install" }, "keywords": [], diff --git a/src/view.ts b/src/view.ts index 13f978d..6866d7e 100644 --- a/src/view.ts +++ b/src/view.ts @@ -246,6 +246,8 @@ export class CalendarView extends ItemView { }, }); + calendarEl.style.height = "100%"; + this.registerEvent( this.app.metadataCache.on("changed", this.cacheCallback) ); @@ -276,7 +278,10 @@ export class CalendarView extends ItemView { } onResize(): void { - this.calendar && this.calendar.render(); + if (this.calendar) { + this.calendar.render(); + this.calendar.el.style.height = "100%"; + } } async onClose() {