UNPKG

145 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Namespace: CB_Screen</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Namespace: CB_Screen</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 CB_Screen
91 </h2>
92
93
94</header>
95
96
97<article>
98 <div class="container-overview">
99
100
101 <div class="description"><p>Static class to manage the screen. It will return itself if it is tried to be instantiated. It can use <a href="https://github.com/tombigel/detect-zoom">detect-zoom</a> and <a href="https://github.com/richtr/NoSleep.js?utm_source=recordnotfound.com">NoSleep.js</a>.</p></div>
102
103
104
105<dl class="details">
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
136 <dd class="tag-source">
137 <ul class="dummy">
138 <li>
139 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
140 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-12">line 12</a>
141 </li>
142 </ul>
143 </dd>
144
145
146
147
148
149
150
151</dl>
152
153
154
155
156 </div>
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 <h3 class="subsection-title">Methods</h3>
172
173 <dl>
174
175<hr>
176<dt>
177 <h4 class="name" id=".focus"><span class="type-signature">&lt;static> </span>focus<span class="signature">()</span><span class="type-signature"></span></h4>
178
179
180</dt>
181<dd>
182
183
184 <div class="description">
185 <p>Sets the focus to the main window (if possible).</p>
186 </div>
187
188
189
190
191
192
193
194
195
196
197<dl class="details">
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
228 <dd class="tag-source">
229 <ul class="dummy">
230 <li>
231 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
232 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-647">line 647</a>
233 </li>
234 </ul>
235 </dd>
236
237
238
239
240
241
242
243</dl>
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259</dd>
260
261
262
263<hr>
264<dt>
265 <h4 class="name" id=".getAvailableHeight"><span class="type-signature">&lt;static> </span>getAvailableHeight<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
266
267
268</dt>
269<dd>
270
271
272 <div class="description">
273 <p>Gets the current available screen height (vertical resolution). Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight">window.screen.availHeight</a> property internally, when possible.</p>
274 </div>
275
276
277
278
279
280
281
282
283
284
285<dl class="details">
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
316 <dd class="tag-source">
317 <ul class="dummy">
318 <li>
319 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
320 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-244">line 244</a>
321 </li>
322 </ul>
323 </dd>
324
325
326
327
328
329
330
331</dl>
332
333
334
335
336
337
338
339
340
341
342
343
344
345 <h5>Returns:</h5>
346
347
348<div class="param-desc">
349 <p>Returns the current available screen height (vertical resolution) in pixels.</p>
350</div>
351
352
353
354<dl>
355 <dt>
356 Type
357 </dt>
358 <dd>
359
360<span class="param-type">number</span>
361
362
363
364 </dd>
365</dl>
366
367
368
369
370
371</dd>
372
373
374
375<hr>
376<dt>
377 <h4 class="name" id=".getAvailableHeightPrevious"><span class="type-signature">&lt;static> </span>getAvailableHeightPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
378
379
380</dt>
381<dd>
382
383
384 <div class="description">
385 <p>Gets the previous available screen height (vertical resolution). Useful when the resolution (screen size and/or orientation) changed. Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight">window.screen.availHeight</a> property internally, when possible.</p>
386 </div>
387
388
389
390
391
392
393
394
395
396
397<dl class="details">
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
428 <dd class="tag-source">
429 <ul class="dummy">
430 <li>
431 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
432 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-272">line 272</a>
433 </li>
434 </ul>
435 </dd>
436
437
438
439
440
441
442
443</dl>
444
445
446
447
448
449
450
451
452
453
454
455
456
457 <h5>Returns:</h5>
458
459
460<div class="param-desc">
461 <p>Returns the previous available screen height (vertical resolution) in pixels.</p>
462</div>
463
464
465
466<dl>
467 <dt>
468 Type
469 </dt>
470 <dd>
471
472<span class="param-type">number</span>
473
474
475
476 </dd>
477</dl>
478
479
480
481
482
483</dd>
484
485
486
487<hr>
488<dt>
489 <h4 class="name" id=".getAvailableWidth"><span class="type-signature">&lt;static> </span>getAvailableWidth<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
490
491
492</dt>
493<dd>
494
495
496 <div class="description">
497 <p>Gets the current available screen width (horizontal resolution). Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/availWidth">window.screen.availWidth</a> property internally, when possible.</p>
498 </div>
499
500
501
502
503
504
505
506
507
508
509<dl class="details">
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
540 <dd class="tag-source">
541 <ul class="dummy">
542 <li>
543 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
544 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-228">line 228</a>
545 </li>
546 </ul>
547 </dd>
548
549
550
551
552
553
554
555</dl>
556
557
558
559
560
561
562
563
564
565
566
567
568
569 <h5>Returns:</h5>
570
571
572<div class="param-desc">
573 <p>Returns the current available screen width (horizontal resolution) in pixels.</p>
574</div>
575
576
577
578<dl>
579 <dt>
580 Type
581 </dt>
582 <dd>
583
584<span class="param-type">number</span>
585
586
587
588 </dd>
589</dl>
590
591
592
593
594
595</dd>
596
597
598
599<hr>
600<dt>
601 <h4 class="name" id=".getAvailableWidthPrevious"><span class="type-signature">&lt;static> </span>getAvailableWidthPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
602
603
604</dt>
605<dd>
606
607
608 <div class="description">
609 <p>Gets the previous available screen width (horizontal resolution). Useful when the resolution (screen size and/or orientation) changed. Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/availWidth">window.screen.availWidth</a> property internally, when possible.</p>
610 </div>
611
612
613
614
615
616
617
618
619
620
621<dl class="details">
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
652 <dd class="tag-source">
653 <ul class="dummy">
654 <li>
655 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
656 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-260">line 260</a>
657 </li>
658 </ul>
659 </dd>
660
661
662
663
664
665
666
667</dl>
668
669
670
671
672
673
674
675
676
677
678
679
680
681 <h5>Returns:</h5>
682
683
684<div class="param-desc">
685 <p>Returns the previous available screen width (horizontal resolution) in pixels.</p>
686</div>
687
688
689
690<dl>
691 <dt>
692 Type
693 </dt>
694 <dd>
695
696<span class="param-type">number</span>
697
698
699
700 </dd>
701</dl>
702
703
704
705
706
707</dd>
708
709
710
711<hr>
712<dt>
713 <h4 class="name" id=".getColorDepth"><span class="type-signature">&lt;static> </span>getColorDepth<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
714
715
716</dt>
717<dd>
718
719
720 <div class="description">
721 <p>Gets the current color depth. Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/colorDepth">window.screen.colorDepth</a> property internally, when possible.</p>
722 </div>
723
724
725
726
727
728
729
730
731
732
733<dl class="details">
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
764 <dd class="tag-source">
765 <ul class="dummy">
766 <li>
767 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
768 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-354">line 354</a>
769 </li>
770 </ul>
771 </dd>
772
773
774
775
776
777
778
779</dl>
780
781
782
783
784
785
786
787
788
789
790
791
792
793 <h5>Returns:</h5>
794
795
796<div class="param-desc">
797 <p>Returns the current color depth.</p>
798</div>
799
800
801
802<dl>
803 <dt>
804 Type
805 </dt>
806 <dd>
807
808<span class="param-type">number</span>
809
810
811
812 </dd>
813</dl>
814
815
816
817
818
819</dd>
820
821
822
823<hr>
824<dt>
825 <h4 class="name" id=".getHeight"><span class="type-signature">&lt;static> </span>getHeight<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
826
827
828</dt>
829<dd>
830
831
832 <div class="description">
833 <p>Gets the current screen height (vertical resolution). Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/height">window.screen.height</a> property internally, when possible.</p>
834 </div>
835
836
837
838
839
840
841
842
843
844
845<dl class="details">
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
876 <dd class="tag-source">
877 <ul class="dummy">
878 <li>
879 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
880 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-188">line 188</a>
881 </li>
882 </ul>
883 </dd>
884
885
886
887
888
889
890
891</dl>
892
893
894
895
896
897
898
899
900
901
902
903
904
905 <h5>Returns:</h5>
906
907
908<div class="param-desc">
909 <p>Returns the current screen height (vertical resolution) in pixels.</p>
910</div>
911
912
913
914<dl>
915 <dt>
916 Type
917 </dt>
918 <dd>
919
920<span class="param-type">number</span>
921
922
923
924 </dd>
925</dl>
926
927
928
929
930
931</dd>
932
933
934
935<hr>
936<dt>
937 <h4 class="name" id=".getHeightPrevious"><span class="type-signature">&lt;static> </span>getHeightPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
938
939
940</dt>
941<dd>
942
943
944 <div class="description">
945 <p>Gets the previous screen height (vertical resolution). Calculated through the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/height">window.screen.height</a> property internally, when possible. Useful when the resolution (screen size and/or orientation) changed.</p>
946 </div>
947
948
949
950
951
952
953
954
955
956
957<dl class="details">
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
988 <dd class="tag-source">
989 <ul class="dummy">
990 <li>
991 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
992 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-216">line 216</a>
993 </li>
994 </ul>
995 </dd>
996
997
998
999
1000
1001
1002
1003</dl>
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017 <h5>Returns:</h5>
1018
1019
1020<div class="param-desc">
1021 <p>Returns the previous screen height (vertical resolution) in pixels.</p>
1022</div>
1023
1024
1025
1026<dl>
1027 <dt>
1028 Type
1029 </dt>
1030 <dd>
1031
1032<span class="param-type">number</span>
1033
1034
1035
1036 </dd>
1037</dl>
1038
1039
1040
1041
1042
1043</dd>
1044
1045
1046
1047<hr>
1048<dt>
1049 <h4 class="name" id=".getOrientation"><span class="type-signature">&lt;static> </span>getOrientation<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
1050
1051
1052</dt>
1053<dd>
1054
1055
1056 <div class="description">
1057 <p>Gets the current orientation from the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation">screen orientation object</a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation">Screen Orientation API</a>.</p>
1058 </div>
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069<dl class="details">
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1100 <dd class="tag-source">
1101 <ul class="dummy">
1102 <li>
1103 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1104 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-1724">line 1724</a>
1105 </li>
1106 </ul>
1107 </dd>
1108
1109
1110
1111
1112
1113
1114
1115</dl>
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129 <h5>Returns:</h5>
1130
1131
1132<div class="param-desc">
1133 <p>Returns a string with the current orientation from the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation">screen orientation object</a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation">Screen Orientation API</a>. If cannot be found, it will return &quot;landscape-primary&quot; as default.</p>
1134</div>
1135
1136
1137
1138<dl>
1139 <dt>
1140 Type
1141 </dt>
1142 <dd>
1143
1144<span class="param-type">string</span>
1145
1146
1147
1148 </dd>
1149</dl>
1150
1151
1152
1153
1154
1155</dd>
1156
1157
1158
1159<hr>
1160<dt>
1161 <h4 class="name" id=".getOrientationObject"><span class="type-signature">&lt;static> </span>getOrientationObject<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
1162
1163
1164</dt>
1165<dd>
1166
1167
1168 <div class="description">
1169 <p>Gets the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation">screen orientation object</a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation">Screen Orientation API</a>.</p>
1170 </div>
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181<dl class="details">
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1212 <dd class="tag-source">
1213 <ul class="dummy">
1214 <li>
1215 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1216 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-1691">line 1691</a>
1217 </li>
1218 </ul>
1219 </dd>
1220
1221
1222
1223
1224
1225
1226
1227</dl>
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241 <h5>Returns:</h5>
1242
1243
1244<div class="param-desc">
1245 <p>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation">screen orientation object</a> of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation">Screen Orientation API</a>.</p>
1246</div>
1247
1248
1249
1250<dl>
1251 <dt>
1252 Type
1253 </dt>
1254 <dd>
1255
1256<span class="param-type">Object</span>
1257
1258
1259
1260 </dd>
1261</dl>
1262
1263
1264
1265
1266
1267</dd>
1268
1269
1270
1271<hr>
1272<dt>
1273 <h4 class="name" id=".getPixelRatio"><span class="type-signature">&lt;static> </span>getPixelRatio<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
1274
1275
1276</dt>
1277<dd>
1278
1279
1280 <div class="description">
1281 <p>Gets the current pixel ratio of the screen (main window). Uses <a href="https://github.com/tombigel/detect-zoom">detect-zoom</a> internally.</p>
1282 </div>
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293<dl class="details">
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1324 <dd class="tag-source">
1325 <ul class="dummy">
1326 <li>
1327 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1328 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-467">line 467</a>
1329 </li>
1330 </ul>
1331 </dd>
1332
1333
1334
1335
1336
1337
1338
1339 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
1340 <dd class="tag-todo">
1341 <ul>
1342 <li>Find a better and more-compatible way to detect pixel ratio which supports as many web clients as possible.</li>
1343 </ul>
1344 </dd>
1345
1346</dl>
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360 <h5>Returns:</h5>
1361
1362
1363<div class="param-desc">
1364 <p>Returns the current pixel ratio of the screen (main window). Default pixel ratio is 1 (one) even when it fails.</p>
1365</div>
1366
1367
1368
1369<dl>
1370 <dt>
1371 Type
1372 </dt>
1373 <dd>
1374
1375<span class="param-type">number</span>
1376
1377
1378
1379 </dd>
1380</dl>
1381
1382
1383
1384
1385
1386</dd>
1387
1388
1389
1390<hr>
1391<dt>
1392 <h4 class="name" id=".getPixelRatioPrevious"><span class="type-signature">&lt;static> </span>getPixelRatioPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
1393
1394
1395</dt>
1396<dd>
1397
1398
1399 <div class="description">
1400 <p>Gets the previous pixel ratio of the screen (main window). Useful when the zoom/pixel-ratio changed. Uses <a href="https://github.com/tombigel/detect-zoom">detect-zoom</a> internally.</p>
1401 </div>
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412<dl class="details">
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1443 <dd class="tag-source">
1444 <ul class="dummy">
1445 <li>
1446 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1447 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-487">line 487</a>
1448 </li>
1449 </ul>
1450 </dd>
1451
1452
1453
1454
1455
1456
1457
1458 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
1459 <dd class="tag-todo">
1460 <ul>
1461 <li>Find a better and more-compatible way to detect pixel ratio which supports as many web clients as possible.</li>
1462 </ul>
1463 </dd>
1464
1465</dl>
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479 <h5>Returns:</h5>
1480
1481
1482<div class="param-desc">
1483 <p>Returns the previous pixel ratio of the screen (main window). Default previous pixel ratio is 0 (zero) even when it fails.</p>
1484</div>
1485
1486
1487
1488<dl>
1489 <dt>
1490 Type
1491 </dt>
1492 <dd>
1493
1494<span class="param-type">number</span>
1495
1496
1497
1498 </dd>
1499</dl>
1500
1501
1502
1503
1504
1505</dd>
1506
1507
1508
1509<hr>
1510<dt>
1511 <h4 class="name" id=".getScrollLeft"><span class="type-signature">&lt;static> </span>getScrollLeft<span class="signature">()</span><span class="type-signature"> &rarr; {number|null}</span></h4>
1512
1513
1514</dt>
1515<dd>
1516
1517
1518 <div class="description">
1519 <p>Gets the current scroll left position (horizontal scroll) of the screen (main window). Uses the <a href="CB_Elements.html#.getScrollLeftById"><code>CB_Elements.getScrollLeftById</code></a> function internally.</p>
1520 </div>
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531<dl class="details">
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1562 <dd class="tag-source">
1563 <ul class="dummy">
1564 <li>
1565 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1566 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-369">line 369</a>
1567 </li>
1568 </ul>
1569 </dd>
1570
1571
1572
1573
1574
1575
1576
1577</dl>
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591 <h5>Returns:</h5>
1592
1593
1594<div class="param-desc">
1595 <p>Returns the current scroll left position (horizontal scroll) of the screen (main window). It could return null if something fails.</p>
1596</div>
1597
1598
1599
1600<dl>
1601 <dt>
1602 Type
1603 </dt>
1604 <dd>
1605
1606<span class="param-type">number</span>
1607|
1608
1609<span class="param-type">null</span>
1610
1611
1612
1613 </dd>
1614</dl>
1615
1616
1617
1618
1619
1620</dd>
1621
1622
1623
1624<hr>
1625<dt>
1626 <h4 class="name" id=".getScrollTop"><span class="type-signature">&lt;static> </span>getScrollTop<span class="signature">()</span><span class="type-signature"> &rarr; {number|null}</span></h4>
1627
1628
1629</dt>
1630<dd>
1631
1632
1633 <div class="description">
1634 <p>Gets the current scroll top position (vertical scroll) of the screen (main window). Uses the <a href="CB_Elements.html#.getScrollTopById"><code>CB_Elements.getScrollTopById</code></a> function internally.</p>
1635 </div>
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646<dl class="details">
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1677 <dd class="tag-source">
1678 <ul class="dummy">
1679 <li>
1680 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1681 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-402">line 402</a>
1682 </li>
1683 </ul>
1684 </dd>
1685
1686
1687
1688
1689
1690
1691
1692</dl>
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706 <h5>Returns:</h5>
1707
1708
1709<div class="param-desc">
1710 <p>Returns the current scroll top position (vertical scroll) of the screen (main window). It could return null if something fails.</p>
1711</div>
1712
1713
1714
1715<dl>
1716 <dt>
1717 Type
1718 </dt>
1719 <dd>
1720
1721<span class="param-type">number</span>
1722|
1723
1724<span class="param-type">null</span>
1725
1726
1727
1728 </dd>
1729</dl>
1730
1731
1732
1733
1734
1735</dd>
1736
1737
1738
1739<hr>
1740<dt>
1741 <h4 class="name" id=".getWidth"><span class="type-signature">&lt;static> </span>getWidth<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
1742
1743
1744</dt>
1745<dd>
1746
1747
1748 <div class="description">
1749 <p>Gets the current screen width (horizontal resolution). Uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/width">window.screen.width</a> property internally, when possible.</p>
1750 </div>
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761<dl class="details">
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1792 <dd class="tag-source">
1793 <ul class="dummy">
1794 <li>
1795 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1796 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-172">line 172</a>
1797 </li>
1798 </ul>
1799 </dd>
1800
1801
1802
1803
1804
1805
1806
1807</dl>
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821 <h5>Returns:</h5>
1822
1823
1824<div class="param-desc">
1825 <p>Returns the current screen width (horizontal resolution) in pixels.</p>
1826</div>
1827
1828
1829
1830<dl>
1831 <dt>
1832 Type
1833 </dt>
1834 <dd>
1835
1836<span class="param-type">number</span>
1837
1838
1839
1840 </dd>
1841</dl>
1842
1843
1844
1845
1846
1847</dd>
1848
1849
1850
1851<hr>
1852<dt>
1853 <h4 class="name" id=".getWidthPrevious"><span class="type-signature">&lt;static> </span>getWidthPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
1854
1855
1856</dt>
1857<dd>
1858
1859
1860 <div class="description">
1861 <p>Gets the previous screen width (horizontal resolution). Calculated through the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/width">window.screen.width</a> property internally, when possible. Useful when the resolution (screen size and/or orientation) changed.</p>
1862 </div>
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873<dl class="details">
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1904 <dd class="tag-source">
1905 <ul class="dummy">
1906 <li>
1907 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
1908 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-204">line 204</a>
1909 </li>
1910 </ul>
1911 </dd>
1912
1913
1914
1915
1916
1917
1918
1919</dl>
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933 <h5>Returns:</h5>
1934
1935
1936<div class="param-desc">
1937 <p>Returns the previous screen width (horizontal resolution) in pixels.</p>
1938</div>
1939
1940
1941
1942<dl>
1943 <dt>
1944 Type
1945 </dt>
1946 <dd>
1947
1948<span class="param-type">number</span>
1949
1950
1951
1952 </dd>
1953</dl>
1954
1955
1956
1957
1958
1959</dd>
1960
1961
1962
1963<hr>
1964<dt>
1965 <h4 class="name" id=".getWindowHeight"><span class="type-signature">&lt;static> </span>getWindowHeight<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
1966
1967
1968</dt>
1969<dd>
1970
1971
1972 <div class="description">
1973 <p>Gets the current window height (vertical resolution). Internally, uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight">window.innerHeight</a> if possible and fallbacks to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight">document.documentElement.clientHeight</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight">document.body.clientHeight</a> property otherwise, when possible.</p>
1974 </div>
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985<dl class="details">
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2016 <dd class="tag-source">
2017 <ul class="dummy">
2018 <li>
2019 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2020 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-307">line 307</a>
2021 </li>
2022 </ul>
2023 </dd>
2024
2025
2026
2027
2028
2029
2030
2031</dl>
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045 <h5>Returns:</h5>
2046
2047
2048<div class="param-desc">
2049 <p>Returns the current window height (vertical resolution) in pixels.</p>
2050</div>
2051
2052
2053
2054<dl>
2055 <dt>
2056 Type
2057 </dt>
2058 <dd>
2059
2060<span class="param-type">number</span>
2061
2062
2063
2064 </dd>
2065</dl>
2066
2067
2068
2069
2070
2071</dd>
2072
2073
2074
2075<hr>
2076<dt>
2077 <h4 class="name" id=".getWindowHeightPrevious"><span class="type-signature">&lt;static> </span>getWindowHeightPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2078
2079
2080</dt>
2081<dd>
2082
2083
2084 <div class="description">
2085 <p>Gets the previous window height (vertical resolution). Useful when the resolution (screen size and/or orientation) or window size changed. Internally, uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/innerHeight">window.innerHeight</a> if possible and fallbacks to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight">document.documentElement.clientHeight</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight">document.body.clientHeight</a> property otherwise, when possible.</p>
2086 </div>
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097<dl class="details">
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2128 <dd class="tag-source">
2129 <ul class="dummy">
2130 <li>
2131 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2132 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-342">line 342</a>
2133 </li>
2134 </ul>
2135 </dd>
2136
2137
2138
2139
2140
2141
2142
2143</dl>
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157 <h5>Returns:</h5>
2158
2159
2160<div class="param-desc">
2161 <p>Returns the previous window height (vertical resolution) in pixels.</p>
2162</div>
2163
2164
2165
2166<dl>
2167 <dt>
2168 Type
2169 </dt>
2170 <dd>
2171
2172<span class="param-type">number</span>
2173
2174
2175
2176 </dd>
2177</dl>
2178
2179
2180
2181
2182
2183</dd>
2184
2185
2186
2187<hr>
2188<dt>
2189 <h4 class="name" id=".getWindowWidth"><span class="type-signature">&lt;static> </span>getWindowWidth<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2190
2191
2192</dt>
2193<dd>
2194
2195
2196 <div class="description">
2197 <p>Gets the current window width (horizontal resolution). Internally, uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth">window.innerWidth</a> if possible and fallbacks to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth">document.documentElement.clientWidth</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth">document.body.clientWidth</a> property otherwise, when possible.</p>
2198 </div>
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209<dl class="details">
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2240 <dd class="tag-source">
2241 <ul class="dummy">
2242 <li>
2243 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2244 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-284">line 284</a>
2245 </li>
2246 </ul>
2247 </dd>
2248
2249
2250
2251
2252
2253
2254
2255</dl>
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269 <h5>Returns:</h5>
2270
2271
2272<div class="param-desc">
2273 <p>Returns the current window width (horizontal resolution) in pixels.</p>
2274</div>
2275
2276
2277
2278<dl>
2279 <dt>
2280 Type
2281 </dt>
2282 <dd>
2283
2284<span class="param-type">number</span>
2285
2286
2287
2288 </dd>
2289</dl>
2290
2291
2292
2293
2294
2295</dd>
2296
2297
2298
2299<hr>
2300<dt>
2301 <h4 class="name" id=".getWindowWidthPrevious"><span class="type-signature">&lt;static> </span>getWindowWidthPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2302
2303
2304</dt>
2305<dd>
2306
2307
2308 <div class="description">
2309 <p>Gets the previous window width (horizontal resolution). Useful when the resolution (screen size and/or orientation) or window size changed. Internally, uses the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth">window.innerWidth</a> if possible and fallbacks to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth">document.documentElement.clientWidth</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth">document.body.clientWidth</a> property otherwise, when possible.</p>
2310 </div>
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321<dl class="details">
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2352 <dd class="tag-source">
2353 <ul class="dummy">
2354 <li>
2355 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2356 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-330">line 330</a>
2357 </li>
2358 </ul>
2359 </dd>
2360
2361
2362
2363
2364
2365
2366
2367</dl>
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381 <h5>Returns:</h5>
2382
2383
2384<div class="param-desc">
2385 <p>Returns the previous window width (horizontal resolution) in pixels.</p>
2386</div>
2387
2388
2389
2390<dl>
2391 <dt>
2392 Type
2393 </dt>
2394 <dd>
2395
2396<span class="param-type">number</span>
2397
2398
2399
2400 </dd>
2401</dl>
2402
2403
2404
2405
2406
2407</dd>
2408
2409
2410
2411<hr>
2412<dt>
2413 <h4 class="name" id=".getZoom"><span class="type-signature">&lt;static> </span>getZoom<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2414
2415
2416</dt>
2417<dd>
2418
2419
2420 <div class="description">
2421 <p>Gets the current zoom level of the screen (main window). Uses <a href="https://github.com/tombigel/detect-zoom">detect-zoom</a> internally.</p>
2422 </div>
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433<dl class="details">
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2464 <dd class="tag-source">
2465 <ul class="dummy">
2466 <li>
2467 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2468 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-436">line 436</a>
2469 </li>
2470 </ul>
2471 </dd>
2472
2473
2474
2475
2476
2477
2478
2479 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
2480 <dd class="tag-todo">
2481 <ul>
2482 <li>Find a better and more-compatible way to detect zoom which supports as many web clients as possible.</li>
2483 </ul>
2484 </dd>
2485
2486</dl>
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500 <h5>Returns:</h5>
2501
2502
2503<div class="param-desc">
2504 <p>Returns the current zoom level of the screen (main window). Default zoom level is 1 (one) even when it fails.</p>
2505</div>
2506
2507
2508
2509<dl>
2510 <dt>
2511 Type
2512 </dt>
2513 <dd>
2514
2515<span class="param-type">number</span>
2516
2517
2518
2519 </dd>
2520</dl>
2521
2522
2523
2524
2525
2526</dd>
2527
2528
2529
2530<hr>
2531<dt>
2532 <h4 class="name" id=".getZoomPrevious"><span class="type-signature">&lt;static> </span>getZoomPrevious<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2533
2534
2535</dt>
2536<dd>
2537
2538
2539 <div class="description">
2540 <p>Gets the previous zoom level of the screen (main window). Useful when the zoom changed. Uses <a href="https://github.com/tombigel/detect-zoom">detect-zoom</a> internally.</p>
2541 </div>
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552<dl class="details">
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2583 <dd class="tag-source">
2584 <ul class="dummy">
2585 <li>
2586 <a href="CrossBase_audiovisual_image_CB_Screen.js.html">CrossBase/audiovisual/image/CB_Screen.js</a>,
2587 <a href="CrossBase_audiovisual_image_CB_Screen.js.html#sunlight-1-line-455">line 455</a>
2588 </li>
2589 </ul>
2590 </dd>
2591
2592
2593
2594
2595
2596
2597
2598</dl>
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612 <h5>Returns:</h5>
2613
2614
2615<div class="param-desc">
2616 <p>Returns the previous zoom level of the screen (main window). Default previous zoom level is 0 (zero) even when it fails.</p>
2617</div>
2618
2619
2620