From fbec2b8d76298052fba0d5fdb6e8c3a56e03e56b Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Thu, 20 Sep 2012 14:36:59 -0400 Subject: [PATCH] Use DOM ids in get_zephyr This greatly reduces lag on mouseover selection. (imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f) --- zephyr/static/js/zephyr.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 6d7896f534..56a2666f96 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -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() {