From f0f968b28bda251b12800facf03486eefe730424 Mon Sep 17 00:00:00 2001 From: hwinkel Date: Mon, 16 Oct 2023 21:26:04 +0200 Subject: [PATCH] ADD: added entity input field with bootstrap --- .../src/components/control/EntityControl.jsx | 104 ++++++++++++------ webapp/src/components/control/controls.css | 14 ++- 2 files changed, 80 insertions(+), 38 deletions(-) diff --git a/webapp/src/components/control/EntityControl.jsx b/webapp/src/components/control/EntityControl.jsx index 86d6156..249cc04 100644 --- a/webapp/src/components/control/EntityControl.jsx +++ b/webapp/src/components/control/EntityControl.jsx @@ -3,6 +3,7 @@ import {useState,useEffect, useRef} from 'react'; import { useForm, SubmitHandler } from "react-hook-form" import Form from 'react-bootstrap/Form'; import FloatingLabel from 'react-bootstrap/FloatingLabel'; +import InputGroup from 'react-bootstrap/InputGroup'; import 'bootstrap/dist/css/bootstrap.min.css'; @@ -130,6 +131,7 @@ const handleClick = (e) => { { Data: "Entity", Type: "New", + Name: formData.name, Speed: formData.speed, Course: formData.course, Position: formData.position @@ -166,68 +168,100 @@ const handleClick = (e) => {
- {/*
Kind:
*/} -
- - - - + + + Kind + + + + - - -
-
Domain:
+ {/*
Domain:
+ */} + + + Domain + + + + +
-
-
Type:
- -
+ + Type + + + +
-
+ + Name + + {/* */} + + + {/*
Name:
- -
+
*/}
-
Course:
-
-
- + +
+ Course + +
-
-
Speed:
-
- + +
+
+
+ Speed + +
-
-
Lat:
+
+ Lat +
-
-
Lon:
+
+ Lon + {/* */} +
+ {/*
+
Lon:
+
*/}
-
-
Height:
+
+ Height + {/* */} +
+ {/*
Height:
+
+
*/}
diff --git a/webapp/src/components/control/controls.css b/webapp/src/components/control/controls.css index 52d9b0f..785381a 100644 --- a/webapp/src/components/control/controls.css +++ b/webapp/src/components/control/controls.css @@ -43,6 +43,14 @@ width: 50%; width: 50% !important; } +.NumberInputs{ + width: 3.3em; +} +.NumberInputsGroup +{ + flex-wrap: inherit !important; +} + .ControlValues{ float: left; display: contents; @@ -65,10 +73,10 @@ display: contents; .parent { display: grid; - grid-template-columns: repeat(3, 1fr); - grid-template-rows: repeat(6, 2em); + grid-template-columns: repeat(3, 2fr); + grid-template-rows: repeat(6, 3em); grid-column-gap: 0px; - grid-row-gap: 0px; + grid-row-gap: 0px3 } .div1 { grid-area: 1 / 1 / 2 / 4; }