Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nickw1 committed Dec 29, 2022
1 parent 588ea35 commit 4e68242
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 2 additions & 3 deletions aframe/examples/new-location-based/show-distance/clicker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*
AFRAME.registerComponent("clicker", {
init: function() {
this.el.addEventListener("click", e=> {
alert(this.el.components["gps-new-entity-place"].distance);
const dist = this.el.components["gps-new-entity-place"].distance;
alert(dist === undefined ? "Please move to a new location to obtain the distance" : `This object is ${dist} metres away.`);
});
}
});
*/
9 changes: 0 additions & 9 deletions aframe/examples/new-location-based/show-distance/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
AFRAME.registerComponent("clicker", {
init: function() {
this.el.addEventListener("click", e=> {
const dist = this.el.components["gps-new-entity-place"].distance;
alert(dist === undefined ? "Please move to a new location to obtain the distance" : `This object is ${dist} metres away.`);
});
}
});

window.onload = () => {
let testEntitiesAdded = false;
alert('If testing the lat/lon manual input on a mobile device, please turn off your GPS to avoid the real location being detected.');
Expand Down

0 comments on commit 4e68242

Please sign in to comment.