Performance fix, avoid expensive animations, they slow down scrolling

This commit is contained in:
Sam 2013-07-01 11:35:36 +10:00
parent 8e1469c7cc
commit 8c053b8e83
1 changed files with 2 additions and 5 deletions

View File

@ -40,11 +40,8 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
bg.css("border-right-width", "1px");
}
if (currentWidth === 0) {
bg.width(progressWidth);
} else {
bg.animate({ width: progressWidth }, 400);
}
// Disable animation for now so it performs better
bg.width(progressWidth);
}.observes('progressPosition', 'topic.filtered_posts_count', 'topic.loaded'),
updateTitle: function() {