|
@@ -6,8 +6,8 @@ import {CustomInput, Input} from 'reactstrap';
|
|
|
export default class Leaflets extends React.Component{
|
|
|
constructor(props) {
|
|
|
super(props)
|
|
|
- this.metricsRef = React.createRef()
|
|
|
- this.metricsRef2 = React.createRef()
|
|
|
+ this.measurementsDiv = React.createRef()
|
|
|
+ this.markerInfoDiv = React.createRef()
|
|
|
this.state = {
|
|
|
markers: [],
|
|
|
markersFromTo: [],
|
|
@@ -37,7 +37,7 @@ export default class Leaflets extends React.Component{
|
|
|
let duration = endTime - this.state.startTime
|
|
|
let msg = "Duration " + duration.toFixed(3) + " for " + this.state.noOfSteps + " steps"
|
|
|
console.log(msg)
|
|
|
- this.metricsRef2.current.innerHTML = msg
|
|
|
+ this.markerInfoDiv.current.innerHTML = msg
|
|
|
this.setState({currStep: this.state.currStep + 1});
|
|
|
}
|
|
|
}
|
|
@@ -117,13 +117,13 @@ export default class Leaflets extends React.Component{
|
|
|
<div className="mapTestContainer">
|
|
|
<div className="mapTime">
|
|
|
<CustomInput type="switch" onChange={this.changeSwitch} id="exampleCustomSwitch" name="customSwitch" label="Move markers" />
|
|
|
- <div ref={this.metricsRef2}>
|
|
|
+ <div ref={this.markerInfoDiv}>
|
|
|
<span>{this.state.currStep} steps</span>
|
|
|
</div>
|
|
|
<span>Number of Markers: {this.state.noOfMarkers}</span><br/>
|
|
|
<Input type="text" onChange={this.setNoOfMarkers} value={this.state.noOfMarkers}/>
|
|
|
|
|
|
- <div ref={this.metricsRef}>
|
|
|
+ <div ref={this.measurementsDiv}>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className="mapTest">
|