File tree 3 files changed +18
-5
lines changed
3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ canvas {
118
118
}
119
119
120
120
# mobileVrBtn {
121
+ position : absolute;
122
+ bottom : 1em ;
123
+ right : 4em ;
124
+ }
125
+
126
+ # mobileFullscreenBtn {
121
127
position : absolute;
122
128
bottom : 1em ;
123
129
right : 1em ;
@@ -161,4 +167,7 @@ canvas {
161
167
# mobileVrBtn {
162
168
display : none !important ;
163
169
}
170
+ # mobileFullscreenBtn {
171
+ display : none !important ;
172
+ }
164
173
}
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ <h2 id="mapTitle"></h2>
45
45
</ div >
46
46
47
47
< img style ="display: none; " src ="images/vr_goggles_sm.png " id ="mobileVrBtn "/>
48
+ < img src ="images/fullscreen_sm.png " id ="mobileFullscreenBtn "/>
48
49
49
50
< div id ="viewport-info " style ="display: none; ">
50
51
< div id ="controls ">
Original file line number Diff line number Diff line change @@ -769,10 +769,13 @@ function main() {
769
769
} , false ) ;
770
770
771
771
// Fullscreen
772
- var button = document . getElementById ( 'fullscreenBtn' ) ;
773
- button . addEventListener ( 'click' , function ( ) {
772
+ function goFullscreen ( ) {
774
773
viewportFrame . requestFullScreen ( ) ;
775
- } , false ) ;
774
+ }
775
+ var fullscreenButton = document . getElementById ( 'fullscreenBtn' ) ;
776
+ var mobileFullscreenBtn = document . getElementById ( "mobileFullscreenBtn" ) ;
777
+ fullscreenButton . addEventListener ( 'click' , goFullscreen , false ) ;
778
+ mobileFullscreenBtn . addEventListener ( 'click' , goFullscreen , false ) ;
776
779
777
780
// VR
778
781
function goVrFullscreen ( ) {
@@ -782,8 +785,8 @@ function main() {
782
785
}
783
786
var vrBtn = document . getElementById ( "vrBtn" ) ;
784
787
var mobileVrBtn = document . getElementById ( "mobileVrBtn" ) ;
785
- vrBtn . addEventListener ( "click" , goVrFullscreen ) ;
786
- mobileVrBtn . addEventListener ( "click" , goVrFullscreen ) ;
788
+ vrBtn . addEventListener ( "click" , goVrFullscreen , false ) ;
789
+ mobileVrBtn . addEventListener ( "click" , goVrFullscreen , false ) ;
787
790
788
791
}
789
792
window . addEventListener ( "load" , main ) ; // Fire this once the page is loaded up
You can’t perform that action at this time.
0 commit comments