Skip to content

Commit 2173d14

Browse files
committed
fix(desktop): keep zero-size annotation targets eligible for screenshots
1 parent 3fc838b commit 2173d14

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎apps/desktop/src/preview/Manager.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,11 @@ const cropAnnotationScreenshot = (
302302
const scale = Number.isFinite(devicePixelRatio) && devicePixelRatio > 0 ? devicePixelRatio : 1;
303303
// Padding and unions can overlap the viewport without any selected target.
304304
// Check the individual unpadded bounds before accepting even a full capture.
305+
// Zero-size bounds stay eligible: a stroked SVG line reports zero height.
305306
if (
306307
targetRects.length > 0 &&
307308
!targetRects.some(
308309
(rect) =>
309-
rect.width > 0 &&
310-
rect.height > 0 &&
311310
rect.x * scale < full.width &&
312311
rect.y * scale < full.height &&
313312
(rect.x + rect.width) * scale > 0 &&

0 commit comments

Comments
 (0)