|
@@ -496,14 +496,17 @@ export const getAIBorderTaggingInfos = async (
|
|
|
// const curSubgroup = reg ? Number(reg[1]) : undefined;
|
|
// const curSubgroup = reg ? Number(reg[1]) : undefined;
|
|
|
// if (curSubgroup !== subgroup) continue;
|
|
// if (curSubgroup !== subgroup) continue;
|
|
|
// }
|
|
// }
|
|
|
-
|
|
|
|
|
- const min = { x: shape.bbox[0][0], y: shape.bbox[0][2] };
|
|
|
|
|
- const max = { x: shape.bbox[0][0], y: shape.bbox[0][2] };
|
|
|
|
|
|
|
+ for (const box of shape.bbox) {
|
|
|
|
|
+ box[1] *= -1
|
|
|
|
|
+ // console.log(box)
|
|
|
|
|
+ }
|
|
|
|
|
+ const min = { x: shape.bbox[0][0], y: shape.bbox[0][1] };
|
|
|
|
|
+ const max = { x: shape.bbox[0][0], y: shape.bbox[0][1] };
|
|
|
for (const box of shape.bbox) {
|
|
for (const box of shape.bbox) {
|
|
|
min.x = Math.min(box[0], min.x);
|
|
min.x = Math.min(box[0], min.x);
|
|
|
- min.y = Math.min(box[2], min.y);
|
|
|
|
|
|
|
+ min.y = Math.min(box[1], min.y);
|
|
|
max.x = Math.max(box[0], max.x);
|
|
max.x = Math.max(box[0], max.x);
|
|
|
- max.y = Math.max(box[2], max.y);
|
|
|
|
|
|
|
+ max.y = Math.max(box[1], max.y);
|
|
|
}
|
|
}
|
|
|
min.x *= scale;
|
|
min.x *= scale;
|
|
|
min.y *= scale;
|
|
min.y *= scale;
|