|
18 | 18 | }); |
19 | 19 |
|
20 | 20 | // On selection of explore button, initiate exploration mode |
21 | | - $(".earthlapse-modes-menu-container").on("click", ".earthlapse-modes-menu-explorebutton", function (e) { |
| 21 | + $(".earthlapse-modes-menu-container").on("mousedown", ".earthlapse-modes-menu-explorebutton", function (e) { |
| 22 | + $(this).addClass("hasfocus"); |
| 23 | + }).on("mouseup", ".earthlapse-modes-menu-explorebutton", function (e) { |
| 24 | + var $this = $(this); |
| 25 | + |
| 26 | + // If this button had focus, then we should execute an action |
| 27 | + if (!$this.hasClass("hasfocus")) { return; } |
| 28 | + $this.removeClass("hasfocus"); |
| 29 | + |
22 | 30 | EarthlapseUI.Modes.changeModeTo("explore"); |
23 | 31 | }); |
24 | 32 |
|
|
62 | 70 | }); |
63 | 71 | </script> |
64 | 72 | <div class="earthlapse-modes-screen"> |
65 | | - <h2>Choose a story to begin</h2> |
66 | | - |
67 | | - <div class="earthlapse-stories-gallery"> |
68 | | - <!-- div class="ui-button earthlapse-modes-menu-item" data-storyid="las-vegas"> |
69 | | - <div class="img"> |
70 | | - <img src="http://thumbnails.cmucreatelab.org/thumbnail?root=http://earthengine.google.org/timelapse/data/20130507&boundsLTRB=239833.73508091227,522897.15176901396,243314.48721083216,524958.4096709508&width=250&height=150&frameTime=2.1"> |
71 | | - <div class="desc">Las Vegas</div> |
72 | | - </div> |
73 | | - </div> |
74 | | -
|
75 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="lake-urmia"> |
76 | | - <div class="img"> |
77 | | - <img src="http://thumbnails.cmucreatelab.org/thumbnail?root=http://earthengine.google.org/timelapse/data/20130507&boundsLTRB=829953.5478804687,512969.2419359944,842765.3283798227,520556.2182004556&width=250&height=150&frameTime=1.5"> |
78 | | - <div class="desc">Lake Urmia</div> |
79 | | - </div> |
80 | | - </div> |
81 | | -
|
82 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="fires-at-night"> |
83 | | - <div class="img"> |
84 | | - <img src="http://thumbnails.cmucreatelab.org/thumbnail?root=http://earthengine.google.org/timelapse/data/20130507&boundsLTRB=69258.77206860541,209520.56620188005,1212884.3532619216,886761.3400647969&width=250&height=150&frameTime=1.6"> |
85 | | - <div class="desc">Fire at Night</div> |
86 | | - </div> |
87 | | - </div> |
88 | | -
|
89 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="example"> |
90 | | - <div class="img"> |
91 | | - <img src="http://placehold.it/250x150"> |
92 | | - <div class="desc">Amazon Deforestation</div> |
93 | | - </div> |
94 | | - </div> |
| 73 | + <h1>Welcome to Planet Earth!</h1> |
95 | 74 |
|
96 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="example"> |
97 | | - <div class="img"> |
98 | | - <img src="http://placehold.it/250x150"> |
99 | | - <div class="desc">Columbia Glacier</div> |
100 | | - </div> |
101 | | - </div> |
102 | | -
|
103 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="example"> |
104 | | - <div class="img"> |
105 | | - <img src="http://placehold.it/250x150"> |
106 | | - <div class="desc">Solar Panel in California</div> |
107 | | - </div> |
108 | | - </div> |
| 75 | + <section class="earthlapse-modes-menu-section earthlapse-modes-menu-section-stories"> |
| 76 | + <h2 class="earthlapse-modes-menu-section-heading">Choose a story to begin</h2> |
109 | 77 |
|
110 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="example"> |
111 | | - <div class="img"> |
112 | | - <img src="http://placehold.it/250x150"> |
113 | | - <div class="desc">U.S. Solar</div> |
114 | | - </div> |
| 78 | + <div class="earthlapse-stories-gallery"> |
| 79 | + <!-- Todo: Columbia Glacier --> |
| 80 | + <!-- Todo: Solar Panel in California --> |
| 81 | + <!-- Todo: U.S. Solar --> |
| 82 | + <!-- Todo: U.S. Wind --> |
115 | 83 | </div> |
| 84 | + </section> |
116 | 85 |
|
117 | | - <div class="ui-button earthlapse-modes-menu-item" data-storyid="example"> |
118 | | - <div class="img"> |
119 | | - <img src="http://placehold.it/250x150"> |
120 | | - <div class="desc">U.S. Solar</div> |
121 | | - </div> |
122 | | - </div --> |
123 | | - </div> |
124 | | - |
125 | | - <div class="earthlapse-modes-menu-explore"> |
126 | | - <button class="ui-button earthlapse-modes-menu-explorebutton">Explore on your own</button> |
127 | | - </div> |
| 86 | + <section class="earthlapse-modes-menu-section earthlapse-modes-menu-section-explore"> |
| 87 | + <button class="earthlapse-modes-menu-section-heading ui-button earthlapse-modes-menu-explorebutton">Explore on your own</button> |
| 88 | + </section> |
128 | 89 | </div> |
0 commit comments