From 9903d153dfa40bde60600e8f88c0a338349dc603 Mon Sep 17 00:00:00 2001 From: zatchii Date: Sun, 5 May 2013 01:14:21 +0000 Subject: [PATCH] Hide notes in scale_all --- app/assets/javascripts/notes.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 003cf4be2..18c28487a 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -101,9 +101,14 @@ Danbooru.Note = { }, 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) { Danbooru.Note.Box.scale($(v)); }); + if (was_visible) container.style.display = 'block'; }, toggle_all: function() {