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 17
17
* @method static void reload($id = null)
18
18
* @method static void maximize($id = null)
19
19
* @method static void minimize($id = null)
20
+ * @method static void zoomFactor(float $zoomFactor = 1.0)
20
21
*/
21
22
class Window extends Facade
22
23
{
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ class Window
68
68
69
69
protected array $ webPreferences = [];
70
70
71
+ protected float $ zoomFactor = 1.0 ;
72
+
71
73
public function __construct (string $ id )
72
74
{
73
75
$ this ->id = $ id ;
@@ -326,6 +328,20 @@ public function webPreferences(array $preferences): static
326
328
return $ this ;
327
329
}
328
330
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
+
329
345
public function toArray ()
330
346
{
331
347
return [
@@ -364,6 +380,7 @@ public function toArray()
364
380
'autoHideMenuBar ' => $ this ->autoHideMenuBar ,
365
381
'transparent ' => $ this ->transparent ,
366
382
'webPreferences ' => $ this ->webPreferences ,
383
+ 'zoomFactor ' => $ this ->zoomFactor ,
367
384
];
368
385
}
369
386
You can’t perform that action at this time.
0 commit comments