ADD: reworked the entity edit field
This commit is contained in:
@@ -9,6 +9,7 @@ import Controls from "./components/control/controls";
|
||||
import OpenSeaMap from "./components/OpenSeaMap/OpenSeaMap";
|
||||
import {w3cwebsocket as W3CWebSocket} from "websocket"
|
||||
|
||||
export const defaultLocale = "en-US";
|
||||
|
||||
const config = {
|
||||
// apiUrl: process.env.REACT_APP_WEBAPP_WS_URL,
|
||||
@@ -112,6 +113,12 @@ class App extends Component {
|
||||
|
||||
setEntityOnFocus(Entity)
|
||||
{
|
||||
if(Entity == undefined)
|
||||
{
|
||||
this.resetEntityOnFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
this.getEntityFromID(this.state.Entities,Entity)
|
||||
// console.log(Entity);
|
||||
this.setState({
|
||||
@@ -119,6 +126,7 @@ class App extends Component {
|
||||
});
|
||||
this.state.Entities.forEach((element, index) => {
|
||||
console.log(element);
|
||||
|
||||
if(element.id === Entity.EntityID)
|
||||
{
|
||||
var tmpList = structuredClone(this.state.Entities);
|
||||
@@ -141,7 +149,7 @@ class App extends Component {
|
||||
this.state.Entities.map((element ,index) => {
|
||||
if(element.id === this.state.EntityOnFocus.EntityID)
|
||||
{
|
||||
this.state.Entities[index].onFocus = undefined;
|
||||
this.state.Entities[index].onFocus = false;
|
||||
}
|
||||
})
|
||||
console.log(this.state.Entities)
|
||||
@@ -167,6 +175,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const {name} = this.state;
|
||||
return (
|
||||
<div className="App">
|
||||
|
||||
Reference in New Issue
Block a user