Skip to content

Commit 1905702

Browse files
committed
Clean up values
Remove duplicate values and reference to object field that doesn't exist
1 parent e559aa0 commit 1905702

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

boneset-api/server.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,10 @@ app.get("/api/annotations/:boneId", searchLimiter, async (req, res) => {
374374
});
375375
}
376376

377-
// Define Full Slide Dimensions for Normalization
378-
// Use standard PPT slide dimensions if 'full_slide_dimensions' is missing from the template.
379-
const fullDimensions = templateData.full_slide_dimensions || {
380-
width: 9144000,
381-
height: 5143500
382-
};
383-
const slideWidth = fullDimensions.width;
384-
const slideHeight = fullDimensions.height;
377+
// Define Full Slide Dimensions for Normalization. We normalize the text annotation dimentions to the slide
378+
// widths so that the values used by the frontend are decoupled from the slide dimensions.
379+
const slideWidth = 9144000;
380+
const slideHeight = 5143500;
385381

386382
// Combine required data for the frontend
387383
let normalizedGeometry = templateData.normalized_geometry

templates/js/coloredRegionsOverlay.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ function createColoredRegionsSVG(coloredRegions, imageWidth, imageHeight, imageD
268268
// New format: coordinates are relative to the image and scaled to pixel size
269269
// Old format: coordinates are in EMUs relative to slide and require full conversion
270270
const dimensions = {
271-
slideWidth: imageData.width || imageData.width,
272-
slideHeight: imageData.height || imageData.height,
271+
slideWidth: imageData.width,
272+
slideHeight: imageData.height,
273273
imageWidth: imageWidth,
274274
imageHeight: imageHeight
275275
};

0 commit comments

Comments
 (0)