From e6e3d315226e965e985b58da45e1560cb145d6e1 Mon Sep 17 00:00:00 2001 From: zatchii Date: Sun, 5 May 2013 13:40:42 +0000 Subject: [PATCH] Fix note bounding on left edge bound_position must be called after the body is shown, while resize must be called before. --- app/assets/javascripts/notes.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 78bcf773d..bf0594b6a 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -139,10 +139,6 @@ Danbooru.Note = { top: $note_box.position().top + $note_box.height() + 5, left: $note_box.position().left }); - if (!$note_body.data('resized')) { - Danbooru.Note.Body.resize($note_body); - $note_body.data('resized', 'true'); - } Danbooru.Note.Body.bound_position($note_body); }, @@ -173,8 +169,12 @@ Danbooru.Note = { Danbooru.Note.Body.hide_all(); Danbooru.Note.clear_timeouts(); var $note_body = Danbooru.Note.Body.find(id); - Danbooru.Note.Body.initialize($note_body); + if (!$note_body.data('resized')) { + Danbooru.Note.Body.resize($note_body); + $note_body.data('resized', 'true'); + } $note_body.show(); + Danbooru.Note.Body.initialize($note_body); }, find: function(id) {