Use Throttling
This commit is contained in:
parent
d3fc8d02c4
commit
c18a2752af
4 changed files with 17 additions and 8 deletions
|
|
@ -67,10 +67,9 @@ export default class ControlMap extends React.PureComponent<ControlMapProps> {
|
|||
|
||||
renderMarker(control: Control, key: string) {
|
||||
return (
|
||||
<MqttContext.Consumer>
|
||||
<MqttContext.Consumer key={key}>
|
||||
{({ state }) => (
|
||||
<Marker position={convertPoint(control.position)}
|
||||
key={key}
|
||||
icon={this.createLeafletIcon(control, state)}
|
||||
onClick={() => this.props.onChangeControl(control)}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue