From 6ffc5f076c0f1df0274fa0f7bb23eccdd7ab8afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 17 Jan 2023 23:58:46 +0000 Subject: [PATCH] revert to single "focused" prop --- ui/src/components/rects/Rect.vue | 24 +++++------------------- ui/src/components/rects/RectPad.vue | 2 +- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/ui/src/components/rects/Rect.vue b/ui/src/components/rects/Rect.vue index 2af32ce..f139bd2 100644 --- a/ui/src/components/rects/Rect.vue +++ b/ui/src/components/rects/Rect.vue @@ -14,11 +14,7 @@ import { Rectangle } from "./rectangles"; @Options({ props: { - selected: { - type: Boolean, - default: false, - }, - highlighted: { + focused: { type: Boolean, default: false, }, @@ -26,19 +22,14 @@ import { Rectangle } from "./rectangles"; }, }) export default class Rect extends Vue { - private selected!: boolean; - private highlighted!: boolean; + private focused!: boolean; private rectangle!: Rectangle; private get classes(): string { let result: string[] = []; - if (this.selected) { - result.push("select"); - } - - if (this.highlighted) { - result.push("highlight"); + if (this.focused) { + result.push("focus"); } return result.join(" "); @@ -54,12 +45,7 @@ rect { stroke-opacity: 0.9; stroke-width: 1; - &.select { - fill-opacity: 0.4; - stroke-opacity: 1; - } - - &.highlight { + &.focus { fill: gold; stroke: yellow; } diff --git a/ui/src/components/rects/RectPad.vue b/ui/src/components/rects/RectPad.vue index 97e40a6..3c9eee7 100644 --- a/ui/src/components/rects/RectPad.vue +++ b/ui/src/components/rects/RectPad.vue @@ -19,7 +19,7 @@ />