SDA-3534 Centering SDA snipping tool (#1311)

This commit is contained in:
Salah Benmoussati 2022-01-10 09:28:47 +01:00 committed by GitHub
parent 11af9b3eac
commit 312af153ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1283,12 +1283,13 @@ export class WindowHandler {
windowBounds.width !== toolWidth
) {
logger.info(
'window-handler: Could not create window with correct size, resizing with setBounds',
'window-handler: Could not create window with correct size, resizing with setBounds and centering with center',
);
this.snippingToolWindow.setBounds({
height: toolHeight,
width: toolWidth,
});
this.snippingToolWindow.center();
logger.info(
'window-handler: window bounds after resizing: ' +
JSON.stringify(this.snippingToolWindow.getBounds()),