Update component.jsx
This commit is contained in:
parent
c6da577c2b
commit
dcf50d4e47
@ -40,6 +40,7 @@ export default class EllipseDrawComponent extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const results = this.getCoordinates();
|
const results = this.getCoordinates();
|
||||||
const { annotation, slideWidth } = this.props;
|
const { annotation, slideWidth } = this.props;
|
||||||
|
const { fill } = annotation;
|
||||||
const {
|
const {
|
||||||
cx, cy, rx, ry,
|
cx, cy, rx, ry,
|
||||||
} = results;
|
} = results;
|
||||||
@ -50,7 +51,7 @@ export default class EllipseDrawComponent extends Component {
|
|||||||
cy={cy}
|
cy={cy}
|
||||||
rx={rx}
|
rx={rx}
|
||||||
ry={ry}
|
ry={ry}
|
||||||
fill="none"
|
fill={ fill ? getFormattedColor(annotation.color) : "none" }
|
||||||
stroke={getFormattedColor(annotation.color)}
|
stroke={getFormattedColor(annotation.color)}
|
||||||
strokeWidth={getStrokeWidth(annotation.thickness, slideWidth)}
|
strokeWidth={getStrokeWidth(annotation.thickness, slideWidth)}
|
||||||
style={{ WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)' }}
|
style={{ WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)' }}
|
||||||
@ -67,6 +68,7 @@ EllipseDrawComponent.propTypes = {
|
|||||||
points: PropTypes.arrayOf(PropTypes.number).isRequired,
|
points: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||||
color: PropTypes.number.isRequired,
|
color: PropTypes.number.isRequired,
|
||||||
thickness: PropTypes.number.isRequired,
|
thickness: PropTypes.number.isRequired,
|
||||||
|
fill: PropTypes.bool.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
// Defines the width of the slide (svg coordinate system), which needed in calculations
|
// Defines the width of the slide (svg coordinate system), which needed in calculations
|
||||||
slideWidth: PropTypes.number.isRequired,
|
slideWidth: PropTypes.number.isRequired,
|
||||||
|
Loading…
Reference in New Issue
Block a user