import React from 'react'; import { CircleMarker as LeafletCircleMarker } from 'react-leaflet'; import { Coordinate } from 'types'; import { createLeafletLatLngFromCoordinate } from '../helpers'; import { MAP } from '../constants'; interface Props { coordinate: Coordinate; index: number; onClick: (coordinate: Coordinate, index: number) => void; } interface State { isHoverActive: boolean; } export class EdgeVertex extends React.Component { state = { isHoverActive: false, }; handleMouseOver = () => this.setState({ isHoverActive: true }); handleMouseOut = () => this.setState({ isHoverActive: false }); handleClick = () => this.props.onClick(this.props.coordinate, this.props.index); render() { const { isHoverActive } = this.state; const { coordinate } = this.props; return ( ); } }