File tree Expand file tree Collapse file tree 4 files changed +13
-84
lines changed Expand file tree Collapse file tree 4 files changed +13
-84
lines changed Original file line number Diff line number Diff line change 1+ /node_modules
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -56,17 +56,8 @@ <h1 class="speed">
5656 }
5757 /*Compass: https://thenounproject.com/search/?q=compass&i=592352*/
5858 </ style >
59- < script >
60- const arrow = document . querySelector ( '.arrow' ) ;
61- const speed = document . querySelector ( '.speed-value' ) ;
59+ < script src ="speed.js ">
6260
63- navigator . geolocation . watchPosition ( ( data ) => {
64- console . log ( data ) ;
65- speed . textContent = data . coords . speed ;
66- arrow . style . transform = `rotate(${ data . coords . heading } deg)` ;
67- } , ( err ) => {
68- console . error ( err ) ;
69- } ) ;
7061 </ script >
7162</ body >
7263</ html >
Original file line number Diff line number Diff line change 1+ const arrow = document . querySelector ( '.arrow' ) ;
2+ const speed = document . querySelector ( '.speed-value' ) ;
3+
4+ navigator . geolocation . watchPosition ( ( data ) => {
5+ console . log ( data ) ;
6+ speed . textContent = data . coords . speed ;
7+ arrow . style . transform = `rotate(${ data . coords . heading } deg)` ;
8+ } , ( err ) => {
9+ console . err ( err ) ;
10+ alert ( 'HEY! YOU GOTTA ALLOW THAT TO HAPPEN!!!' ) ;
11+ } ) ;
You can’t perform that action at this time.
0 commit comments