From 5456b7ec5f8485e39833cae0dd6fd406caf65872 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 5 Oct 2011 19:05:33 -0400 Subject: [PATCH] potential fix for #103: Note placement on full sized images --- app/assets/javascripts/notes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 9ed1af0bc..27ff7a5f5 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -159,7 +159,8 @@ Danbooru.Note = { }, bound_position: function($note_body) { - var doc_width = $(window).width(); + var $image = $("#image"); + var doc_width = $image.offset().left + $image.width(); if ($note_body.offset().left + $note_body.width() > doc_width) { $note_body.css({ // 30 is a magic number to factor in width of the scroll bar