Skip to content

Fix zoom-out on an image [#131080] #134706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/image-preview/media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
];

const settings = getSettings();
const isMac = settings.isMac;
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;

const vscode = acquireVsCodeApi();

Expand Down
10 changes: 0 additions & 10 deletions extensions/image-preview/src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class Preview extends Disposable {
private async getWebviewContents(): Promise<string> {
const version = Date.now().toString();
const settings = {
isMac: isMac(),
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
};

Expand Down Expand Up @@ -262,15 +261,6 @@ class Preview extends Disposable {
}
}

declare const process: undefined | { readonly platform: string };

function isMac(): boolean {
if (typeof process === 'undefined') {
return false;
}
return process.platform === 'darwin';
}

function escapeAttribute(value: string | vscode.Uri): string {
return value.toString().replace(/"/g, '&quot;');
}
Expand Down