mirror of
https://github.com/azaion/ui.git
synced 2026-06-21 11:11:10 +00:00
fix annotation photo
This commit is contained in:
@@ -148,7 +148,7 @@ function CanvasEditor({
|
||||
if (isDragging || resizeData) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
|
||||
if (currentDetection && mouseDownPos) {
|
||||
const dx = Math.abs(currentDetection.x2 - currentDetection.x1);
|
||||
const dy = Math.abs(currentDetection.y2 - currentDetection.y1);
|
||||
@@ -161,6 +161,8 @@ function CanvasEditor({
|
||||
y1: Math.min(currentDetection.y1, currentDetection.y2),
|
||||
x2: Math.max(currentDetection.x1, currentDetection.x2),
|
||||
y2: Math.max(currentDetection.y1, currentDetection.y2),
|
||||
kw: width / containerRef.current.offsetWidth,
|
||||
kh: height / containerRef.current.offsetHeight
|
||||
};
|
||||
|
||||
const newDetections = [...localDetections, normalizedDetection];
|
||||
|
||||
Reference in New Issue
Block a user