Ideendokument

This commit is contained in:
Jörn-Michael Miehe 2023-09-20 16:16:45 +00:00
parent 0fcae295ec
commit cc94aace76
5 changed files with 37 additions and 22 deletions

View file

@ -6,7 +6,12 @@
- Option "Nur Groß-/Kleinbuchstaben" (standard nur groß) - Option "Nur Groß-/Kleinbuchstaben" (standard nur groß)
- Option "Leerzeichen ignorieren" (standard ja) - Option "Leerzeichen ignorieren" (standard ja)
- Option "custom Zuordnung Buchstaben" (standard leer) - Option "custom Zuordnung Buchstaben" (standard leer)
- Türchen sichtbar machen (besser für touch, standard nein)
# Fixed # Aufgaben
- Lösungsbuchstaben weniger als türchen erzeugt bug - Rework PreviewDoor für RectangleCanvas
# Erledigt
- Lösungsbuchstaben weniger als türchen erzeugt bug

View file

@ -1,5 +1,5 @@
<template> <template>
<SVGRect :rectangle="door.position" :focused="false" @click.left="on_click" /> <SVGRect :rectangle="door.position" @click.left="on_click" />
</template> </template>
<script lang="ts"> <script lang="ts">

View file

@ -1,6 +1,6 @@
<template> <template>
<rect <rect
:class="focused ? 'focus' : ''" :class="color !== undefined ? `visible ${color}` : ''"
:x="rectangle.left" :x="rectangle.left"
:y="rectangle.top" :y="rectangle.top"
:width="rectangle.width" :width="rectangle.width"
@ -12,32 +12,42 @@
import { Rectangle } from "@/lib/rectangle"; import { Rectangle } from "@/lib/rectangle";
import { Options, Vue } from "vue-class-component"; import { Options, Vue } from "vue-class-component";
// type RectClass = "red" | "yellow" | "green" | "blue" | "purple";
type RectColor = "yellow" | "green";
@Options({ @Options({
props: { props: {
focused: { color: {
type: Boolean, type: String,
default: false, required: false,
}, },
rectangle: Rectangle, rectangle: Rectangle,
}, },
}) })
export default class extends Vue { export default class extends Vue {
public focused!: boolean; public color?: RectColor;
public rectangle!: Rectangle; public rectangle!: Rectangle;
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
rect { rect {
fill: lightgreen; fill: transparent;
stroke: green;
fill-opacity: 0.2;
stroke-opacity: 0.9;
stroke-width: 1;
&.focus { &.visible {
fill: gold; fill-opacity: 0.2;
stroke: yellow; stroke-opacity: 0.9;
stroke-width: 1;
&.yellow {
fill: gold;
stroke: yellow;
}
&.green {
fill: lightgreen;
stroke: green;
}
} }
} }
</style> </style>

View file

@ -1,5 +1,5 @@
<template> <template>
<SVGRect :rectangle="door.position" :focused="editing" /> <SVGRect :rectangle="door.position" :color="editing ? 'yellow' : 'green'" />
<foreignObject <foreignObject
:x="Math.round(parent_aspect_ratio * door.position.left)" :x="Math.round(parent_aspect_ratio * door.position.left)"
:y="door.position.top" :y="door.position.top"
@ -9,7 +9,7 @@
> >
<div <div
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
class="is-flex is-align-items-center is-justify-content-center" class="px-4 is-flex is-align-items-center is-justify-content-center"
@click.left="on_click" @click.left="on_click"
> >
<input <input
@ -22,8 +22,8 @@
placeholder="Tag" placeholder="Tag"
@keydown="on_keydown" @keydown="on_keydown"
/> />
<div v-else-if="door.day > 0" class="is-size-1 has-text-weight-bold"> <div v-else class="is-size-1 has-text-weight-bold has-text-danger">
{{ door.day }} {{ door.day > 0 ? door.day : "*" }}
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
@ -139,7 +139,6 @@ foreignObject {
cursor: pointer; cursor: pointer;
> div { > div {
color: red;
height: inherit; height: inherit;
} }
} }

View file

@ -10,10 +10,11 @@
> >
<SVGRect <SVGRect
v-for="(rect, index) in rectangles" v-for="(rect, index) in rectangles"
color="green"
:key="`rect-${index}`" :key="`rect-${index}`"
:rectangle="rect" :rectangle="rect"
/> />
<SVGRect v-if="preview_visible" :focused="true" :rectangle="preview_rect" /> <SVGRect v-if="preview_visible" color="yellow" :rectangle="preview_rect" />
</ThouCanvas> </ThouCanvas>
</template> </template>