Skip to content

Commit a12e9cd

Browse files
authored
Fix zoom-out on an image [microsoft#131080] (microsoft#134706)
1 parent 38a7110 commit a12e9cd

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

extensions/image-preview/media/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
];
6060

6161
const settings = getSettings();
62-
const isMac = settings.isMac;
62+
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
6363

6464
const vscode = acquireVsCodeApi();
6565

extensions/image-preview/src/preview.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ class Preview extends Disposable {
206206
private async getWebviewContents(): Promise<string> {
207207
const version = Date.now().toString();
208208
const settings = {
209-
isMac: isMac(),
210209
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
211210
};
212211

@@ -262,15 +261,6 @@ class Preview extends Disposable {
262261
}
263262
}
264263

265-
declare const process: undefined | { readonly platform: string };
266-
267-
function isMac(): boolean {
268-
if (typeof process === 'undefined') {
269-
return false;
270-
}
271-
return process.platform === 'darwin';
272-
}
273-
274264
function escapeAttribute(value: string | vscode.Uri): string {
275265
return value.toString().replace(/"/g, '&quot;');
276266
}

0 commit comments

Comments
 (0)