Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow clearing map markers (with keyboard shortcut: #).

  • Loading branch information...
commit f1c5da898aa870b955acaa90112d962a121a35bb 1 parent 8864a4e
@patridge authored
View
1  StackGeography/index.html
@@ -25,6 +25,7 @@
<li><kbd>S</kbd> Choose site...</li>
<li><kbd>O</kbd> Options...</li>
<li><kbd>P</kbd> Polling...</li>
+ <li><kbd>#</kbd> Clear map</li>
</ul>
</div>
<div id="options" class="hidden"></div>
View
8 StackGeography/scripts/main.js
@@ -216,6 +216,14 @@ $(function () {
e.preventDefault();
});
$(document).bind("keydown", "esc", stopAllPolling);
+ $(document).bind("keyup", "#", function (e) {
+ var i = currentMapMarkers.length - 1;
+ for (; i >= 0; i -= 1) {
+ currentMapMarkers[i].clearFromMap();
+ }
+ currentMapMarkers = [];
+ e.preventDefault();
+ });
$(document).bind("keyup", "s", function (e) {
$startPolling.click();
e.preventDefault();
View
2  _todo.txt
@@ -6,9 +6,7 @@ When sending more than 100 IDs to $.stackExchangeApi.get*, chunk into rejoined 1
Options:
limit to tag, by site
slider for polling rate (1 to ?)
- clear current markers
Keyboard shortcuts
[some key]: poll current site now (with debounce, http://benalman.com/projects/jquery-throttle-debounce-plugin/)
- [some key]: clear markers
Offer authentication to boost per-user quota.
Fix: Mac OS X Lion Safari vertical scrollbar issue (https://github.com/patridge/StackGeography/issues/1).
Please sign in to comment.
Something went wrong with that request. Please try again.