зеркало из https://github.com/electron/electron.git
Expose setVisualZoomLevelLimits on webContents and <web-view>
This commit is contained in:
Родитель
756a338b05
Коммит
9a5df9da41
|
@ -691,7 +691,22 @@ Sends a request to get current zoom level, the `callback` will be called with
|
||||||
* `minimumLevel` Number
|
* `minimumLevel` Number
|
||||||
* `maximumLevel` Number
|
* `maximumLevel` Number
|
||||||
|
|
||||||
Sets the maximum and minimum zoom level.
|
**Deprecated:** Call `setVisualZoomLevelLimits` instead to set the visual zoom
|
||||||
|
level limits. This method will be removed in Electron 2.0.
|
||||||
|
|
||||||
|
#### `contents.setVisualZoomLevelLimits(minimumLevel, maximumLevel)`
|
||||||
|
|
||||||
|
* `minimumLevel` Number
|
||||||
|
* `maximumLevel` Number
|
||||||
|
|
||||||
|
Sets the maximum and minimum pinch-to-zoom level.
|
||||||
|
|
||||||
|
#### `contents.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)`
|
||||||
|
|
||||||
|
* `minimumLevel` Number
|
||||||
|
* `maximumLevel` Number
|
||||||
|
|
||||||
|
Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
|
||||||
|
|
||||||
#### `contents.undo()`
|
#### `contents.undo()`
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,10 @@ WebContents.prototype.sendToAll = function (channel, ...args) {
|
||||||
const webFrameMethods = [
|
const webFrameMethods = [
|
||||||
'insertText',
|
'insertText',
|
||||||
'setLayoutZoomLevelLimits',
|
'setLayoutZoomLevelLimits',
|
||||||
|
'setVisualZoomLevelLimits',
|
||||||
'setZoomFactor',
|
'setZoomFactor',
|
||||||
'setZoomLevel',
|
'setZoomLevel',
|
||||||
|
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||||
'setZoomLevelLimits'
|
'setZoomLevelLimits'
|
||||||
]
|
]
|
||||||
const webFrameMethodsWithResult = [
|
const webFrameMethodsWithResult = [
|
||||||
|
|
|
@ -391,8 +391,10 @@ var registerWebViewElement = function () {
|
||||||
'send',
|
'send',
|
||||||
'sendInputEvent',
|
'sendInputEvent',
|
||||||
'setLayoutZoomLevelLimits',
|
'setLayoutZoomLevelLimits',
|
||||||
|
'setVisualZoomLevelLimits',
|
||||||
'setZoomFactor',
|
'setZoomFactor',
|
||||||
'setZoomLevel',
|
'setZoomLevel',
|
||||||
|
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||||
'setZoomLevelLimits'
|
'setZoomLevelLimits'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче