File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
aframe/src/location-based Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ AFRAME.registerComponent('gps-camera', {
112112
113113 window . addEventListener ( eventName , this . _onDeviceOrientation , false ) ;
114114
115+ } ,
116+
117+ play : function ( ) {
115118 this . _watchPositionId = this . _initWatchGPS ( function ( position ) {
116119 var localPosition = {
117120 latitude : position . coords . latitude ,
@@ -155,11 +158,14 @@ AFRAME.registerComponent('gps-camera', {
155158 this . _updateRotation ( ) ;
156159 } ,
157160
158- remove : function ( ) {
161+ pause : function ( ) {
159162 if ( this . _watchPositionId ) {
160163 navigator . geolocation . clearWatch ( this . _watchPositionId ) ;
161164 }
162165 this . _watchPositionId = null ;
166+ } ,
167+
168+ remove : function ( ) {
163169
164170 var eventName = this . _getDeviceOrientationEventName ( ) ;
165171 window . removeEventListener ( eventName , this . _onDeviceOrientation , false ) ;
You can’t perform that action at this time.
0 commit comments