notes: clean up note visibility toggling.
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user