ADD: added possibility to drag marker and get the new position for updating a entity
This commit is contained in:
@@ -22,21 +22,23 @@ function EntityControl(props)
|
||||
|
||||
useEffect(() => { // Update the document title using the browser API document.title = `You clicked ${count} times`;
|
||||
|
||||
console.log(props.Entity);
|
||||
// console.log(props.Entity);
|
||||
setEntity(props.Entity);
|
||||
if(CourseInControl === false)
|
||||
{
|
||||
// setSpeed(props.Entity.Speed);
|
||||
|
||||
if(Array.isArray(props.Entity.Position) === true)
|
||||
if(props.Entity !== undefined)
|
||||
{
|
||||
|
||||
setFormData({name:props.Entity.Name,course:props.Entity.Course,speed:props.Entity.Speed,position:props.Entity.Position})
|
||||
}else{
|
||||
setFormData({name:props.Entity.Name,course:props.Entity.Course,speed:props.Entity.Speed,position:['','']})
|
||||
setFormData({name:"",course:"",speed:"",position:['','']})
|
||||
|
||||
}
|
||||
// setFormData({speed:props.Entity.Speed})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user