From d196458b25a95d722352e559b4e001b7b1f8ff30 Mon Sep 17 00:00:00 2001 From: Lightforger Date: Mon, 6 May 2013 11:48:38 +0300 Subject: [PATCH] move note-helper out of note-container, fixes #1557 --- 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 01aaa8559..ea4a9718a 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -460,7 +460,7 @@ Danbooru.Note = { Danbooru.Note.new(e.pageX - offset.left, e.pageY - offset.top); } Danbooru.Note.TranslationMode.stop(); - $(".note-box").show(); + $("#note-container").show(); e.stopPropagation(); e.preventDefault(); @@ -529,10 +529,10 @@ Danbooru.Note = { Danbooru.Note.TranslationMode.Drag.h = -Danbooru.Note.TranslationMode.Drag.dragDistanceY; } - $('#note-helper').css({ /* preview of the note you are dragging */ + $('#note-preview').css({ display: 'block', - left: (Danbooru.Note.TranslationMode.Drag.x - offset.left + 1), - top: (Danbooru.Note.TranslationMode.Drag.y - offset.top + 1), + left: (Danbooru.Note.TranslationMode.Drag.x + 1), + top: (Danbooru.Note.TranslationMode.Drag.y + 1), width: (Danbooru.Note.TranslationMode.Drag.w - 3), height: (Danbooru.Note.TranslationMode.Drag.h - 3) }); @@ -546,7 +546,7 @@ Danbooru.Note = { $(window).unbind("mousemove"); if(Danbooru.Note.TranslationMode.Drag.dragging) { - $('#note-helper').css({display:'none'}); + $('#note-preview').css({display:'none'}); Danbooru.Note.TranslationMode.create_note(e, true, Danbooru.Note.TranslationMode.Drag.x, Danbooru.Note.TranslationMode.Drag.y, Danbooru.Note.TranslationMode.Drag.w-1, Danbooru.Note.TranslationMode.Drag.h-1); Danbooru.Note.TranslationMode.Drag.dragging = false; /* border of the note is pixel-perfect on the preview border */ } else { /* no dragging -> create a normal note */