tweaks to embedded notes
This commit is contained in:
@@ -70,6 +70,12 @@ Danbooru.Note = {
|
|||||||
Danbooru.Note.dragging = true;
|
Danbooru.Note.dragging = true;
|
||||||
Danbooru.Note.clear_timeouts();
|
Danbooru.Note.clear_timeouts();
|
||||||
Danbooru.Note.Body.hide_all();
|
Danbooru.Note.Body.hide_all();
|
||||||
|
if (Danbooru.Note.embed) {
|
||||||
|
var $bg = $note_box_inner.find("div.bg")
|
||||||
|
if ($bg.length) {
|
||||||
|
$bg.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -87,6 +93,14 @@ Danbooru.Note = {
|
|||||||
"dragstop resizestop",
|
"dragstop resizestop",
|
||||||
function(e) {
|
function(e) {
|
||||||
Danbooru.Note.dragging = false;
|
Danbooru.Note.dragging = false;
|
||||||
|
if (Danbooru.Note.embed) {
|
||||||
|
var $note_box_inner = $(e.currentTarget);
|
||||||
|
var $bg = $note_box_inner.find("div.bg")
|
||||||
|
if ($bg.length) {
|
||||||
|
$bg.show();
|
||||||
|
Danbooru.Note.Box.resize_inner_border($note_box_inner.closest(".note-box"));
|
||||||
|
}
|
||||||
|
}
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -138,6 +152,14 @@ Danbooru.Note = {
|
|||||||
if ($inner_border.height() >= $note_box.height() - 2) {
|
if ($inner_border.height() >= $note_box.height() - 2) {
|
||||||
$note_box.height($inner_border.height() + 2);
|
$note_box.height($inner_border.height() + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Danbooru.Note.embed) {
|
||||||
|
var $bg = $inner_border.find("div.bg");
|
||||||
|
if ($bg.length) {
|
||||||
|
$bg.height($inner_border.height());
|
||||||
|
$bg.width($inner_border.width());
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
scale: function($note_box) {
|
scale: function($note_box) {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ div#note-container {
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
line-height: normal;
|
||||||
|
|
||||||
div.note-box-inner-border {
|
div.note-box-inner-border {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
@@ -70,12 +71,21 @@ div#note-container {
|
|||||||
div.note-box-inner-border.unsaved {
|
div.note-box-inner-border.unsaved {
|
||||||
border: 1px solid red;
|
border: 1px solid red;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
div.note-box.embedded div.note-box-inner-border {
|
&.embedded {
|
||||||
text-align: center;
|
div.bg {
|
||||||
display: table-cell;
|
height: 100%;
|
||||||
vertical-align: middle;
|
text-align: center;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.note-box-inner-border {
|
||||||
|
text-align: center;
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user