提交 5057c95e 编写于 作者: B Benjamin Pasero

some electron deprecation fixes

上级 9cce34d9
......@@ -6,7 +6,7 @@
const path = require('path');
const cp = require('child_process');
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/atom-shell') {
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') {
console.error("You can't use plain npm to install Code's dependencies.");
console.error(
/^win/.test(process.platform)
......
@echo off
setlocal
set npm_config_disturl="https://atom.io/download/atom-shell"
set npm_config_disturl="https://atom.io/download/electron"
for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a
set npm_config_arch="ia32"
set npm_config_runtime="electron"
......
......@@ -22,7 +22,7 @@ ELECTRON_VERSION=$(
ELECTRON_GYP_HOME=~/.electron-gyp
mkdir -p $ELECTRON_GYP_HOME
npm_config_disturl=https://atom.io/download/atom-shell \
npm_config_disturl=https://atom.io/download/electron \
npm_config_target=$ELECTRON_VERSION \
npm_config_runtime=electron \
HOME=$ELECTRON_GYP_HOME \
......
......@@ -4466,7 +4466,7 @@ declare namespace Electron {
/**
* Sets the maximum and minimum zoom level.
*/
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
/**
* Executes the editing command undo in web page.
*/
......@@ -5161,7 +5161,7 @@ declare namespace Electron {
/**
* Sets the maximum and minimum zoom level.
*/
setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
/**
* Sets a provider for spell checking in input fields and text areas.
*/
......
......@@ -148,7 +148,7 @@ function main() {
// disable pinch zoom & apply zoom level early to avoid glitches
const zoomLevel = configuration.zoomLevel;
webFrame.setZoomLevelLimits(1, 1);
webFrame.setVisualZoomLevelLimits(1, 1);
if (typeof zoomLevel === 'number' && zoomLevel !== 0) {
webFrame.setZoomLevel(zoomLevel);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册