From d0d8978709de7c307ca7469eeeec655e30bd2717 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 13 Mar 2013 13:00:14 -0400 Subject: [PATCH] changes to how note bodies are resized --- app/assets/javascripts/notes.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 2c30f693c..8ef495541 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -190,6 +190,13 @@ Danbooru.Note = { h = h * 1.025; } + if ($note_body.html().length < 20) { + while (h > 20) { + h = h / 1.025; + w = w * 1.025; + } + } + $note_body.css({ width: w, height: "auto" @@ -438,6 +445,7 @@ Danbooru.Note = { $note_body.html("Click to edit"); $("#note-container").append($note_box); $("#note-container").append($note_body); + Danbooru.Note.Body.resize($note_body); Danbooru.Note.Box.resize_inner_border($note_box); Danbooru.Note.id += "x"; },