ADD: added possibility to drag marker and get the new position for updating a entity
This commit is contained in:
@@ -29,7 +29,7 @@ const client = new W3CWebSocket("ws://"+config.apiUrl+":"+config.apiProt+"/");
|
||||
class App extends Component {
|
||||
state = {
|
||||
Entities: [],
|
||||
EntityOnFocus: []
|
||||
EntityOnFocus: undefined
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@@ -41,7 +41,7 @@ class App extends Component {
|
||||
|
||||
client.onmessage = (message) => {
|
||||
const dataFromServer = JSON.parse(message.data);
|
||||
console.log('reply: ', dataFromServer);
|
||||
// console.log('reply: ', dataFromServer);
|
||||
|
||||
if(dataFromServer.Data === "COP")
|
||||
{
|
||||
@@ -97,6 +97,7 @@ class App extends Component {
|
||||
|
||||
setEntityOnFocus(Entity)
|
||||
{
|
||||
|
||||
// console.log(Entity);
|
||||
this.setState({
|
||||
EntityOnFocus: Entity
|
||||
|
||||
Reference in New Issue
Block a user