Skip to content
Snippets Groups Projects
Unverified Commit ed2fb4e9 authored by Michael J. Giarlo's avatar Michael J. Giarlo Committed by GitHub
Browse files

Merge pull request #61 from ProjectMirador/37-anno-defaults

Increase the default stroke width for annotations
parents 5e5b3619 956249d5
No related branches found
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