SDA-3534 Snipping tool width shouldn't be greater than screen width and height (#1325)

This commit is contained in:
Salah Benmoussati
2022-01-19 09:23:24 +01:00
committed by GitHub
parent cc2113eed7
commit 3d2bdbc23b

View File

@@ -1172,9 +1172,7 @@ export class WindowHandler {
// Snipping tool height shouldn't be greater than min of screen width and height (screen orientation can be portrait or landscape)
const minSize = Math.min(workAreaSize.width, workAreaSize.height);
const maxToolHeight = Math.floor(calculatePercentage(minSize, 90));
const maxToolWidth = Math.floor(
calculatePercentage(workAreaSize.width, 90),
);
const maxToolWidth = Math.floor(calculatePercentage(minSize, 90));
const availableAnnotateAreaHeight = maxToolHeight - BUTTON_BARS_HEIGHT;
const availableAnnotateAreaWidth = maxToolWidth;
const scaleFactor = display.scaleFactor;