From 6d7646daf7f29c7d28c9d9e058e612615c502b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 2 Feb 2023 14:12:44 +0000 Subject: [PATCH] DoorPlacer with "Door" logic --- ui/src/components/DoorMapEditor.vue | 4 +-- ui/src/components/door_map/DoorPlacer.vue | 36 ++++++++++++++++++- .../components/door_map/RectangleCanvas.vue | 14 +++++--- ui/src/components/door_map/calendar.ts | 8 ++--- 4 files changed, 51 insertions(+), 11 deletions(-) diff --git a/ui/src/components/DoorMapEditor.vue b/ui/src/components/DoorMapEditor.vue index 81b7e73..36a1337 100644 --- a/ui/src/components/DoorMapEditor.vue +++ b/ui/src/components/DoorMapEditor.vue @@ -4,8 +4,8 @@ - - + +

Bar

diff --git a/ui/src/components/door_map/DoorPlacer.vue b/ui/src/components/door_map/DoorPlacer.vue index 91b6c46..59216f7 100644 --- a/ui/src/components/door_map/DoorPlacer.vue +++ b/ui/src/components/door_map/DoorPlacer.vue @@ -9,13 +9,19 @@
- +
diff --git a/ui/src/components/door_map/calendar.ts b/ui/src/components/door_map/calendar.ts index b61cad4..4e5f2e3 100644 --- a/ui/src/components/door_map/calendar.ts +++ b/ui/src/components/door_map/calendar.ts @@ -1,11 +1,11 @@ import { Rectangle } from "../rects/rectangles"; export class Door { - public day: number; - public readonly position: Rectangle; + public day?: number; + public position: Rectangle; - constructor(day: number, position: Rectangle) { - this.day = day; + constructor(position: Rectangle, day?: number) { this.position = position; + this.day = day; } } \ No newline at end of file