notes: clean up note visibility toggling.

This commit is contained in:
evazion
2020-03-26 00:09:31 -05:00
parent 1af6850c7c
commit 269c20d6ee
2 changed files with 6 additions and 9 deletions

View File

@@ -423,14 +423,7 @@ let Note = {
},
toggle_all: function() {
var $note_container = $(".note-container");
var is_hidden = ($note_container.css('visibility') === 'hidden');
if (is_hidden) {
$note_container.css('visibility', 'visible');
} else {
$note_container.css('visibility', 'hidden');
}
$(".note-container").toggleClass("hide-notes");
}
},
@@ -850,7 +843,7 @@ let Note = {
Note.create(x, y, w, h);
}
$(".note-container").css('visibility', 'visible');
$(".note-container").removeClass("hide-notes");
e.stopPropagation();
e.preventDefault();
},

View File

@@ -2,6 +2,10 @@
display: inline-block;
position: relative;
&.hide-notes .note-box {
visibility: hidden;
}
div.note-body {
position: absolute;
border: var(--note-body-border);