Skip to content

Commit

Permalink
Fix points returned for rectangle shape
Browse files Browse the repository at this point in the history
The ordering in detectShape() put the rectangle first. But for
rectangles isCircleShape() could be true as well. So it could
happen that a rectangle should be imported with circle coordinates
which failed.
  • Loading branch information
mzur committed Sep 30, 2024
1 parent 3ae9d6b commit 3d47e19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getLabelAndUsers(array $categories): array

public function getPoints(): array
{
if ($this->isCircleShape()) {
if ($this->getShape()->id === Shape::circleId()) {
return $this->getCirclePoints();
}
return $this->segmentation;
Expand Down

0 comments on commit 3d47e19

Please sign in to comment.