Skip to content
Snippets Groups Projects
Commit 956249d5 authored by Chris Beer's avatar Chris Beer
Browse files

Increase the default stroke width for annotations, and allow applications to...

Increase the default stroke width for annotations, and allow applications to override that with some configuration
parent 5e5b3619
Branches
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ function createWrapper(props) {
return shallow(
<AnnotationCreation
id="x"
config={{}}
config={{ annotation: {} }}
receiveAnnotation={jest.fn()}
windowId="abc"
{...props}
......
......@@ -64,18 +64,24 @@ class AnnotationCreation extends Component {
}
}
}
this.state = {
const toolState = {
activeTool: 'cursor',
annoBody: '',
closedMode: 'closed',
colorPopoverOpen: false,
currentColorType: false,
fillColor: null,
strokeColor: '#00BFFF',
strokeWidth: 3,
...(props.config.annotation.defaults || {}),
};
this.state = {
...toolState,
annoBody: '',
colorPopoverOpen: false,
lineWeightPopoverOpen: false,
popoverAnchorEl: null,
popoverLineWeightAnchorEl: null,
strokeColor: '#00BFFF',
strokeWidth: 1,
svg: null,
xywh: null,
...annoState,
......@@ -428,6 +434,7 @@ AnnotationCreation.propTypes = {
config: PropTypes.shape({
annotation: PropTypes.shape({
adapter: PropTypes.func,
defaults: PropTypes.objectOf(PropTypes.string),
}),
}).isRequired,
id: PropTypes.string.isRequired,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment