Skip to content
Snippets Groups Projects
Commit 15209b40 authored by Samuel Jugnet's avatar Samuel Jugnet
Browse files

fix freehand

parent 2de29809
No related branches found
No related tags found
1 merge request!10Draft: MigratingAnnotationCreation to MUI5.
Pipeline #1790 failed
......@@ -421,10 +421,10 @@ function AnnotationDrawing(props) {
const shape = { ...currentShape };
const lastpoints = shape.lines[shape.lines.length - 1].points;
shape.lines.push({
points: [lastpoints[2].x, lastpoints[2].y, pos.x, pos.y],
points: [pos.x, pos.y, pos.x, pos.y],
stroke: props.strokeColor,
strokeWidth: props.strokeWidth,
});
......
......@@ -27,13 +27,13 @@ function Freehand({
onShapeClick(shape);
};
return (
<>
<Group
ref={shapeRef}
// width={ 1920}
// height={1080}
// x={ 0}
// y={ 0}
onClick={handleClick}
......@@ -43,6 +43,8 @@ function Freehand({
rotation={shape.rotation}
x={shape.x}
y={shape.y}
width={shape.width || 1920}
height={shape.height || 1080}
onDragEnd={ handleDragEnd}
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment