mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
implement line for admin control panel
This commit is contained in:
parent
15e49614e0
commit
b1703955d8
@ -369,6 +369,75 @@
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- Draw line -->
|
||||||
|
<form
|
||||||
|
class="grid grid-cols-10"
|
||||||
|
method="POST"
|
||||||
|
data-endpoint="line"
|
||||||
|
on:submit|preventDefault={post}
|
||||||
|
>
|
||||||
|
<label class="border-2 border-black border-r-0 border-b-0 pl-1" for="line">Line:</label>
|
||||||
|
<!-- X coordinate -->
|
||||||
|
<label class="border-2 border-black border-b-0 border-r-0 pl-1" for="lx1">X1:</label>
|
||||||
|
<input
|
||||||
|
class="border-2 border-black border-b-0 border-r-0 cursor-text pl-1 bg-gray-100"
|
||||||
|
id="lx1"
|
||||||
|
name="x1"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max={(matrix?.width ?? 192) / (matrix?.scale?.factor ?? 3) - 1}
|
||||||
|
step="1"
|
||||||
|
value="0"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<!-- Y coordinate -->
|
||||||
|
<label class="border-2 border-black border-b-0 border-r-0 pl-1" for="ly1">Y1:</label>
|
||||||
|
<input
|
||||||
|
class="border-2 border-black border-b-0 border-r-0 cursor-text pl-1 bg-gray-100"
|
||||||
|
id="ly1"
|
||||||
|
name="y1"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max={(matrix?.height ?? 192) / (matrix?.scale?.factor ?? 3) - 1}
|
||||||
|
step="1"
|
||||||
|
value="0"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<!-- Width -->
|
||||||
|
<label class="border-2 border-black border-b-0 border-r-0 pl-1" for="lx2">X2:</label>
|
||||||
|
<input
|
||||||
|
class="border-2 border-black border-b-0 border-r-0 cursor-text pl-1 bg-gray-100"
|
||||||
|
id="lx2"
|
||||||
|
name="x2"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max={(matrix?.width ?? 192) / (matrix?.scale?.factor ?? 3) - 1}
|
||||||
|
step="1"
|
||||||
|
value="15"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<!-- Height -->
|
||||||
|
<label class="border-2 border-black border-b-0 border-r-0 pl-1" for="ly2">Y2:</label>
|
||||||
|
<input
|
||||||
|
class="border-2 border-black border-b-0 border-r-0 cursor-text pl-1 bg-gray-100"
|
||||||
|
id="ly2"
|
||||||
|
name="y2"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max={(matrix?.height ?? 192) / (matrix?.scale?.factor ?? 3) - 1}
|
||||||
|
step="1"
|
||||||
|
value="15"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
class="border-2 border-black border-b-0 cursor-pointer hover:bg-gray-200"
|
||||||
|
id="line"
|
||||||
|
name="line"
|
||||||
|
type="submit"
|
||||||
|
value="Submit"
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
|
||||||
<!-- Draw rectangle -->
|
<!-- Draw rectangle -->
|
||||||
<form
|
<form
|
||||||
class="grid grid-cols-10"
|
class="grid grid-cols-10"
|
||||||
|
Loading…
Reference in New Issue
Block a user