Skip to content
Snippets Groups Projects
Commit 5fe2a998 authored by Tom Robinson's avatar Tom Robinson
Browse files

Debounce card re-rendering on window resize to improve performance

parent ca19e05d
No related branches found
No related tags found
No related merge requests found
......@@ -624,10 +624,11 @@ CardControllers.controller('CardDetail', [
}
};
// when the window is resized we need to re-render, mainly so that our visualization pane updates
angular.element($window).bind('resize', function() {
// When the window is resized we need to re-render, mainly so that our visualization pane updates
// Debounce the function to improve resizing performance.
angular.element($window).bind('resize', _.debounce(function() {
renderAll();
});
}, 400));
$scope.$on('$locationChangeStart', function (event) {
// only ask for a confirmation on unsaved changes if the question is
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment