Use DOM ids in get_zephyr

This greatly reduces lag on mouseover selection.

(imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f)
This commit is contained in:
Keegan McAllister 2012-09-20 14:36:59 -04:00
parent 1dabe1cf81
commit fbec2b8d76
1 changed files with 1 additions and 3 deletions

View File

@ -256,10 +256,8 @@ function get_id(zephyr_row) {
return zephyr_row.attr('zid');
}
// NB: this is slow (50 ms or more) due to the custom attribute.
// We instead could compute an id based on the zid and focused table.
function get_zephyr(zephyr_id) {
return $("table.focused_table [zid=" + zephyr_id + "]");
return $('#' + (narrowed ? 'zfilt' : 'zhome') + zephyr_id);
}
function scroll_to_selected() {