diff --git a/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml b/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml index 4d41a79d..081a3bcc 100644 --- a/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml +++ b/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml @@ -6,7 +6,7 @@
+ style="position: absolute; transform: rotate(180deg)">
@@ -100,17 +100,17 @@ // Check if the label will flow off the left of the frame const overflowLeft = (bounds[2] * hw - tw) < (-hw); + // Set alignment + context.textAlign = overflowLeft ? "start" : "end"; + // Text x / y const lx = overflowLeft ? -bw + 6 : -6; const ly = overflowBottom ? -bh - 6 : 16; // Label background x / y - const lbx = overflowLeft ? -bw : -2; + const lbx = overflowLeft ? bw - tw - 12 : -2; const lby = overflowBottom ? bh : -24; - // Set alignment - context.textAlign = overflowLeft ? "start" : "end"; - // Draw background context.fillRect(lbx, lby, tw + 16, th);