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.
This commit is contained in:
Vladimir Agafonkin
2014-01-08 19:28:45 +02:00
parent 1ca0282c99
commit 92e9b0cbbb

View File

@@ -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);