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
No related branches found
No related tags found
2 merge requests!3Integrate upstream tests into gitlab ci,!2Update plugin code from upstream
...@@ -10,7 +10,7 @@ function createWrapper(props) { ...@@ -10,7 +10,7 @@ function createWrapper(props) {
return shallow( return shallow(
<AnnotationCreation <AnnotationCreation
id="x" id="x"
config={{}} config={{ annotation: {} }}
receiveAnnotation={jest.fn()} receiveAnnotation={jest.fn()}
windowId="abc" windowId="abc"
{...props} {...props}
......
...@@ -64,18 +64,24 @@ class AnnotationCreation extends Component { ...@@ -64,18 +64,24 @@ class AnnotationCreation extends Component {
} }
} }
} }
this.state = {
const toolState = {
activeTool: 'cursor', activeTool: 'cursor',
annoBody: '',
closedMode: 'closed', closedMode: 'closed',
colorPopoverOpen: false,
currentColorType: false, currentColorType: false,
fillColor: null, fillColor: null,
strokeColor: '#00BFFF',
strokeWidth: 3,
...(props.config.annotation.defaults || {}),
};
this.state = {
...toolState,
annoBody: '',
colorPopoverOpen: false,
lineWeightPopoverOpen: false, lineWeightPopoverOpen: false,
popoverAnchorEl: null, popoverAnchorEl: null,
popoverLineWeightAnchorEl: null, popoverLineWeightAnchorEl: null,
strokeColor: '#00BFFF',
strokeWidth: 1,
svg: null, svg: null,
xywh: null, xywh: null,
...annoState, ...annoState,
...@@ -428,6 +434,7 @@ AnnotationCreation.propTypes = { ...@@ -428,6 +434,7 @@ AnnotationCreation.propTypes = {
config: PropTypes.shape({ config: PropTypes.shape({
annotation: PropTypes.shape({ annotation: PropTypes.shape({
adapter: PropTypes.func, adapter: PropTypes.func,
defaults: PropTypes.objectOf(PropTypes.string),
}), }),
}).isRequired, }).isRequired,
id: 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