From 4cb36ad878123738d415cd3ae58b9dae0f2e4b19 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Fri, 19 Jul 2019 15:45:37 +0200 Subject: [PATCH] fixing tests --- backend/model/threading/MetadataLoader.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/model/threading/MetadataLoader.ts b/backend/model/threading/MetadataLoader.ts index 94203370..c034138e 100644 --- a/backend/model/threading/MetadataLoader.ts +++ b/backend/model/threading/MetadataLoader.ts @@ -209,10 +209,10 @@ export class MetadataLoader { } const name = region.attributes['mwg-rs:Name']; const box = { - width: Math.round(parseInt('' + regionBox['stArea:w'], 10) * metadata.size.width), - height: Math.round(parseInt('' + regionBox['stArea:h'], 10) * metadata.size.height), - left: Math.round(parseInt('' + regionBox['stArea:x'], 10) * metadata.size.width), - top: Math.round(parseInt('' + regionBox['stArea:y'], 10) * metadata.size.height) + width: Math.round(parseFloat('' + regionBox['stArea:w']) * metadata.size.width), + height: Math.round(parseFloat('' + regionBox['stArea:h']) * metadata.size.height), + left: Math.round(parseFloat('' + regionBox['stArea:x']) * metadata.size.width), + top: Math.round(parseFloat('' + regionBox['stArea:y']) * metadata.size.height) }; // convert center base box to corner based box box.left = Math.max(0, box.left - box.width / 2);