Skip to content

Commit a91f690

Browse files
committed
Do same for gps-projected-camera
1 parent d1e98d3 commit a91f690

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aframe/src/location-based/gps-projected-camera.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ AFRAME.registerComponent('gps-projected-camera', {
129129
}
130130

131131
window.addEventListener(eventName, this._onDeviceOrientation, false);
132-
132+
},
133+
134+
play: function() {
133135
this._watchPositionId = this._initWatchGPS(function (position) {
134136
var localPosition = {
135137
latitude: position.coords.latitude,
@@ -173,12 +175,14 @@ AFRAME.registerComponent('gps-projected-camera', {
173175
this._updateRotation();
174176
},
175177

176-
remove: function() {
178+
pause: function() {
177179
if (this._watchPositionId) {
178180
navigator.geolocation.clearWatch(this._watchPositionId);
179181
}
180182
this._watchPositionId = null;
183+
},
181184

185+
remove: function() {
182186
var eventName = this._getDeviceOrientationEventName();
183187
window.removeEventListener(eventName, this._onDeviceOrientation, false);
184188
window.removeEventListener('gps-entity-place-added', this.onGpsEntityPlaceAdded);

0 commit comments

Comments
 (0)