本文整理匯總了TypeScript中vs/base/browser/browser.setZoomFactor函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript setZoomFactor函數的具體用法?TypeScript setZoomFactor怎麽用?TypeScript setZoomFactor使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了setZoomFactor函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: applyZoom
function applyZoom(zoomLevel: number): void {
webFrame.setZoomLevel(zoomLevel);
browser.setZoomFactor(webFrame.getZoomFactor());
// See https://github.com/Microsoft/vscode/issues/26151
// Cannot be trusted because the webFrame might take some time
// until it really applies the new zoom level
browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false);
}
示例2: init
private init(): void {
// Enable gracefulFs
gracefulFs.gracefulify(fs);
// Massage configuration file URIs
this.reviveUris();
// Setup perf
importEntries(this.configuration.perfEntries);
// Browser config
setZoomFactor(webFrame.getZoomFactor()); // Ensure others can listen to zoom level changes
setZoomLevel(webFrame.getZoomLevel(), true /* isTrusted */); // Can be trusted because we are not setting it ourselves (https://github.com/Microsoft/vscode/issues/26151)
setFullscreen(!!this.configuration.fullscreen);
// Keyboard support
KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged();
}