Use right and bottom in geometry if set zero () (falsy)

This commit is contained in:
Daniel Hammerschmidt 2025-09-15 19:33:22 +02:00
parent b9528f1adb
commit d379338cae
1 changed files with 2 additions and 2 deletions

View File

@ -381,9 +381,9 @@ export default class RFB extends EventTargetMixin {
get cropRect() {
const { width, height, left, right, top, bottom, fbWidth, fbHeight } = this._cropRect;
return `${width}x${height}${
!right ? `+${left}` : `-${right}`
right ?? false ? `+${left}` : `-${right}`
}${
!bottom ? `+${top}` : `-${bottom}`
bottom ?? false ? `+${top}` : `-${bottom}`
}${
width === fbWidth && height === fbHeight ? '' : ` (${fbWidth}x${fbHeight})`
}`;