Open oznmrt opened 2 years ago
Change the function to:
const TestEditor = ({annotation}) => {
return (
<Button variant="outline-secondary" id="button-addon1" style={{
position: "absolute",
left: annotation.geometry.x + '%',
top: annotation.geometry.y + annotation.geometry.height + '%'
}}>
Button
</Button>
)
}
<Annotation
src={"https://placekitten.com/408/287"}
alt='Two pebbles anthropomorphized holding hands'
annotations={annotations}
renderEditor={props => <TestEditor {...props} />}
value={annotation}
onChange={onChange}
onSubmit={onSubmit} />
Hi Everyone,
I want to render custom editor like select option but nothing show up, i am sharing my code below. Am i missing something ?
Please help :)
` import { Button } from 'bootstrap'; import React, { useState } from 'react'; import { Col, FormControl, InputGroup, Row } from 'react-bootstrap'; import Annotation from 'react-image-annotation'
const AnnotationDemo = (props) => {
}
export default AnnotationDemo; `