Don't update pointer when it hasn't actually changed

(imported from commit 41c8b1cd2a586bb9d82b0ff194c076e93f34d98a)
This commit is contained in:
Keegan McAllister 2012-09-13 15:47:17 -04:00
parent d7a5fa3d99
commit 8b691ec0b2
1 changed files with 4 additions and 1 deletions

View File

@ -210,7 +210,10 @@ function respond_to_zephyr() {
}
function update_pointer(zephyr) {
selected_zephyr_id = get_id(zephyr);
var new_selected = get_id(zephyr);
if (new_selected == selected_zephyr_id)
return;
selected_zephyr_id = new_selected;
$('.selected_zephyr').removeClass('selected_zephyr');
zephyr.addClass('selected_zephyr');