render()

in src/components/map/map-popover.js [187:231]


    render() {
      const {x, y, frozen, coordinate, layerHoverProp, isBase, zoom} = this.props;
      const {isLeft} = this.state;

      const style = Number.isFinite(x) && Number.isFinite(y) ? this._getPosition(x, y, isLeft) : {};

      return (
        <ErrorBoundary>
          <StyledMapPopover
            ref={this.popover}
            className="map-popover"
            style={{
              ...style,
              maxWidth: MAX_WIDTH
            }}
          >
            {frozen ? (
              <div className="map-popover__top">
                <div className="gutter" />
                {!isLeft && (
                  <StyledIcon className="popover-arrow-left" onClick={this.moveLeft}>
                    <ArrowLeft />
                  </StyledIcon>
                )}
                <StyledIcon className="popover-pin" onClick={this.props.onClose}>
                  <Pin height="16px" />
                </StyledIcon>
                {isLeft && (
                  <StyledIcon className="popover-arrow-right" onClick={this.moveRight}>
                    <ArrowRight />
                  </StyledIcon>
                )}
                {isBase && (
                  <div className="primary-label">
                    <FormattedMessage id="mapPopover.primary" />
                  </div>
                )}
              </div>
            ) : null}
            {Array.isArray(coordinate) && <CoordinateInfo coordinate={coordinate} zoom={zoom} />}
            {layerHoverProp && <LayerHoverInfo {...layerHoverProp} />}
          </StyledMapPopover>
        </ErrorBoundary>
      );
    }