diff --git a/ui/src/components/calendar/CalendarDoor.vue b/ui/src/components/calendar/CalendarDoor.vue
index 1b895ce..2a161d8 100644
--- a/ui/src/components/calendar/CalendarDoor.vue
+++ b/ui/src/components/calendar/CalendarDoor.vue
@@ -1,5 +1,10 @@
-
+
+
-
-
diff --git a/ui/src/components/calendar/SVGRect.vue b/ui/src/components/calendar/SVGRect.vue
index 51206f5..17c59b2 100644
--- a/ui/src/components/calendar/SVGRect.vue
+++ b/ui/src/components/calendar/SVGRect.vue
@@ -1,5 +1,22 @@
+
+
+
+
+
{
+ // don't loop endlessly
+ if (this.refreshKey < 10000) {
+ this.refreshKey++;
+ }
+ }, 100);
+ }
+
+ public get parent_aspect_ratio(): number {
+ this.refreshKey; // read it just to force recompute on change
+
+ if (
+ !(this.$refs.rect instanceof SVGRectElement) ||
+ this.$refs.rect.parentElement === null
+ ) {
+ this.refresh();
+ return 1;
+ }
+
+ const parent = this.$refs.rect.parentElement;
+ const result = parent.clientWidth / parent.clientHeight;
+
+ // force recompute for suspicious results
+ if (result === 0 || result === Infinity) {
+ this.refresh();
+ return 1;
+ }
+
+ return result;
+ }
}