1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Fixing MySQL number rounding issue

This commit is contained in:
Patrik J. Braun 2021-08-28 13:06:25 +02:00
parent 2b89bc49ab
commit 5d4ca9a590

View File

@ -290,8 +290,8 @@ export class MetadataLoader {
continue;
}
// convert center base box to corner based box
box.left = Math.max(0, box.left - box.width / 2);
box.top = Math.max(0, box.top - box.height / 2);
box.left = Math.round(Math.max(0, box.left - box.width / 2));
box.top = Math.round(Math.max(0, box.top - box.height / 2));
faces.push({name, box});
}
}