зеркало из 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
|
||||
* `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()`
|
||||
|
||||
|
|
|
@ -101,8 +101,10 @@ WebContents.prototype.sendToAll = function (channel, ...args) {
|
|||
const webFrameMethods = [
|
||||
'insertText',
|
||||
'setLayoutZoomLevelLimits',
|
||||
'setVisualZoomLevelLimits',
|
||||
'setZoomFactor',
|
||||
'setZoomLevel',
|
||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||
'setZoomLevelLimits'
|
||||
]
|
||||
const webFrameMethodsWithResult = [
|
||||
|
|
|
@ -391,8 +391,10 @@ var registerWebViewElement = function () {
|
|||
'send',
|
||||
'sendInputEvent',
|
||||
'setLayoutZoomLevelLimits',
|
||||
'setVisualZoomLevelLimits',
|
||||
'setZoomFactor',
|
||||
'setZoomLevel',
|
||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||
'setZoomLevelLimits'
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче