From 03f876470eb3681f2699c77eb689d150b32cba65 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 18 Dec 2018 19:40:42 -0800 Subject: [PATCH] docs: note that visual zoom is disabled by default (#16130) --- docs/api/web-contents.md | 6 ++++++ docs/api/web-frame.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 9e84e40305fa7..19573c20ee271 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -948,6 +948,12 @@ Sends a request to get current zoom level, the `callback` will be called with Sets the maximum and minimum pinch-to-zoom level. +> **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, call: +> +> ```js +> contents.setVisualZoomLevelLimits(1, 3) +> ``` + #### `contents.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)` * `minimumLevel` Number diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index 43612ca8a44f8..4f090c21b90e9 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -50,6 +50,12 @@ Returns `Number` - The current zoom level. Sets the maximum and minimum pinch-to-zoom level. +> **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, call: +> +> ```js +> webFrame.setVisualZoomLevelLimits(1, 3) +> ``` + ### `webFrame.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)` * `minimumLevel` Number