notes: raise notes on hover.

* Raise notes when hovering over them. This is so that when dragging
  embedded notes, they're not hidden behind other notes. Also so that if
  two notes are overlapping, you can hover over one to raise it over the
  other.

* Replace .hovering class with :hover selector.
This commit is contained in:
evazion
2020-07-29 12:04:00 -05:00
parent 0fbbc60a33
commit dcc869cb07
2 changed files with 7 additions and 4 deletions

View File

@@ -86,12 +86,10 @@ class Note {
on_mouseenter() {
this.note.body.show();
this.$note_box.addClass("hovering");
}
on_mouseleave() {
this.note.body.hide();
this.$note_box.removeClass("hovering");
}
on_dragstart() {

View File

@@ -95,6 +95,11 @@
opacity: 0.5;
z-index: 100;
/* Raise notes on hover so overlapping embedded notes are readable. */
&:hover {
z-index: 200;
}
&.unsaved {
border: var(--unsaved-note-box-border);
}
@@ -108,7 +113,7 @@
border: 1px solid transparent;
opacity: 1;
&.hovering {
&:hover {
border: var(--note-box-border);
box-shadow: var(--note-box-shadow);
@@ -132,7 +137,7 @@
border: var(--movable-note-box-border);
}
&:not(.hovering) div.ui-resizable-handle {
&:not(:hover) div.ui-resizable-handle {
display: none !important;
}
}