Update component.jsx
This commit is contained in:
parent
dcf50d4e47
commit
f5ac8470bb
@ -47,6 +47,7 @@ export default class RectangleDrawComponent extends Component {
|
||||
render() {
|
||||
const results = this.getCoordinates();
|
||||
const { annotation, slideWidth } = this.props;
|
||||
const { fill } = annotation;
|
||||
|
||||
return (
|
||||
<rect
|
||||
@ -54,7 +55,7 @@ export default class RectangleDrawComponent extends Component {
|
||||
y={results.y}
|
||||
width={results.width}
|
||||
height={results.height}
|
||||
fill="none"
|
||||
fill={ fill ? getFormattedColor(annotation.color) : "none" }
|
||||
stroke={getFormattedColor(annotation.color)}
|
||||
strokeWidth={getStrokeWidth(annotation.thickness, slideWidth)}
|
||||
style={{ WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)' }}
|
||||
@ -71,6 +72,7 @@ RectangleDrawComponent.propTypes = {
|
||||
points: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
color: PropTypes.number.isRequired,
|
||||
thickness: PropTypes.number.isRequired,
|
||||
fill: PropTypes.bool.isRequired,
|
||||
}).isRequired,
|
||||
// Defines the width of the slide (svg coordinate system), which needed in calculations
|
||||
slideWidth: PropTypes.number.isRequired,
|
||||
|
Loading…
Reference in New Issue
Block a user