Use Throttling

This commit is contained in:
uwap 2018-07-22 05:17:47 +02:00
parent d3fc8d02c4
commit c18a2752af
4 changed files with 17 additions and 8 deletions

View file

@ -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)}
>