Hide notes in scale_all

This commit is contained in:
zatchii
2013-05-05 01:14:21 +00:00
parent bfb58f9455
commit 9903d153df

View File

@@ -101,9 +101,14 @@ Danbooru.Note = {
}, },
scale_all: function() { scale_all: function() {
var container = document.getElementById('note-container');
// Hide notes while rescaling, to prevent unnecessary reflowing
var was_visible = container.style.display != 'none';
if (was_visible) container.style.display = 'none';
$(".note-box").each(function(i, v) { $(".note-box").each(function(i, v) {
Danbooru.Note.Box.scale($(v)); Danbooru.Note.Box.scale($(v));
}); });
if (was_visible) container.style.display = 'block';
}, },
toggle_all: function() { toggle_all: function() {