import React from 'react'; import { AnnotationElementPropsType } from '../../constants/type'; import AnnotationSelector from '../AnnotationSelector'; import Markup from '../Markup'; import { rectCalc } from '../../helpers/position'; import { Popper, } from './styled'; const Highlight: React.SFC = ({ obj_type, obj_attr: { page, position, bdcolor, transparency, }, isCovered, mousePosition, isCollapse, onUpdate, onDelete, scale, viewport, }: AnnotationElementPropsType) => ( <> { Array.isArray(position) && position.map((ele: any, index: number) => { const annotRect = rectCalc(ele, viewport.height, scale); return ( ); }) } { !isCollapse ? ( ) : '' } ); export default Highlight;