From 92e9b0cbbbdb8d2c000ef19373ef52e94aeae342 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 8 Jan 2014 19:28:45 +0200 Subject: [PATCH] throttle hover for less epileptic experience and better perf Otherwise the sidebar flashes so fast that it makes no sense while distracting the user and lagging due to heavy sidebar construction. --- js/id/ui/sidebar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/id/ui/sidebar.js b/js/id/ui/sidebar.js index b3c7294d1..08c46dbc0 100644 --- a/js/id/ui/sidebar.js +++ b/js/id/ui/sidebar.js @@ -32,6 +32,8 @@ iD.ui.Sidebar = function(context) { } }; + sidebar.hover = _.throttle(sidebar.hover, 200); + sidebar.select = function(id, newFeature) { if (!current && id) { featureListWrap.classed('inspector-hidden', true);