Skip to content
Snippets Groups Projects
Commit ca8ff0dc authored by Jack Reed's avatar Jack Reed
Browse files

Use EllipseTool instead of Circle fixes #3

parent 0e1f1ebd
No related branches found
No related tags found
No related merge requests found
...@@ -217,7 +217,7 @@ class AnnotationCreation extends Component { ...@@ -217,7 +217,7 @@ class AnnotationCreation extends Component {
<ToggleButton value="rectangle" aria-label="add a rectangle"> <ToggleButton value="rectangle" aria-label="add a rectangle">
<RectangleIcon /> <RectangleIcon />
</ToggleButton> </ToggleButton>
<ToggleButton value="circle" aria-label="add a circle"> <ToggleButton value="ellipse" aria-label="add a circle">
<CircleIcon /> <CircleIcon />
</ToggleButton> </ToggleButton>
<ToggleButton value="polygon" aria-label="add a polygon"> <ToggleButton value="polygon" aria-label="add a polygon">
......
...@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'; ...@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { OSDReferences } from 'mirador/dist/es/src/plugins/OSDReferences'; import { OSDReferences } from 'mirador/dist/es/src/plugins/OSDReferences';
import { renderWithPaperScope, PaperContainer } from '@psychobolt/react-paperjs'; import { renderWithPaperScope, PaperContainer } from '@psychobolt/react-paperjs';
import { CircleTool, PolygonTool, RectangleTool } from '@psychobolt/react-paperjs-editor'; import { EllipseTool, PolygonTool, RectangleTool } from '@psychobolt/react-paperjs-editor';
import { Point } from 'paper'; import { Point } from 'paper';
import flatten from 'lodash/flatten'; import flatten from 'lodash/flatten';
...@@ -80,8 +80,8 @@ class AnnotationDrawing extends Component { ...@@ -80,8 +80,8 @@ class AnnotationDrawing extends Component {
case 'rectangle': case 'rectangle':
ActiveTool = RectangleTool; ActiveTool = RectangleTool;
break; break;
case 'circle': case 'ellipse':
ActiveTool = CircleTool; ActiveTool = EllipseTool;
break; break;
case 'polygon': case 'polygon':
ActiveTool = PolygonTool; ActiveTool = PolygonTool;
...@@ -113,6 +113,7 @@ class AnnotationDrawing extends Component { ...@@ -113,6 +113,7 @@ class AnnotationDrawing extends Component {
strokeColor, strokeColor,
strokeWidth: strokeWidth / paper.view.zoom, strokeWidth: strokeWidth / paper.view.zoom,
}} }}
paper={paper}
/> />
); );
})} })}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment