File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1717 * @method static void reload($id = null)
1818 * @method static void maximize($id = null)
1919 * @method static void minimize($id = null)
20+ * @method static void zoomFactor(float $zoomFactor = 1.0)
2021 */
2122class Window extends Facade
2223{
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ class Window
6868
6969 protected array $ webPreferences = [];
7070
71+ protected float $ zoomFactor = 1.0 ;
72+
7173 public function __construct (string $ id )
7274 {
7375 $ this ->id = $ id ;
@@ -326,6 +328,20 @@ public function webPreferences(array $preferences): static
326328 return $ this ;
327329 }
328330
331+ public function zoomFactor (float $ zoomFactor = 1.0 ): self
332+ {
333+ $ this ->zoomFactor = $ zoomFactor ;
334+
335+ if (! $ this instanceof PendingOpenWindow) {
336+ $ this ->client ->post ('window/set-zoom-factor ' , [
337+ 'id ' => $ this ->id ,
338+ 'zoomFactor ' => $ zoomFactor ,
339+ ]);
340+ }
341+
342+ return $ this ;
343+ }
344+
329345 public function toArray ()
330346 {
331347 return [
@@ -364,6 +380,7 @@ public function toArray()
364380 'autoHideMenuBar ' => $ this ->autoHideMenuBar ,
365381 'transparent ' => $ this ->transparent ,
366382 'webPreferences ' => $ this ->webPreferences ,
383+ 'zoomFactor ' => $ this ->zoomFactor ,
367384 ];
368385 }
369386
You can’t perform that action at this time.
0 commit comments