revert to single "focused" prop

This commit is contained in:
Jörn-Michael Miehe 2023-01-17 23:58:46 +00:00
parent 740eb574c6
commit 6ffc5f076c
2 changed files with 6 additions and 20 deletions

View file

@ -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;
}

View file

@ -19,7 +19,7 @@
/>
<Rect
v-if="preview_visible"
:highlighted="true"
:focused="true"
:rectangle="preview_rectangle"
/>
</svg>