From 3d47e19235e70d668e0de44bb7d7543f4cb6d2fd Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Mon, 30 Sep 2024 12:41:15 +0200 Subject: [PATCH] Fix points returned for rectangle shape 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. --- src/Annotation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Annotation.php b/src/Annotation.php index f68dd03..ce083ce 100644 --- a/src/Annotation.php +++ b/src/Annotation.php @@ -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;