scrolling inside tree fixed

This commit is contained in:
azivner 2017-08-23 23:36:16 -04:00
parent 9d260e9f5c
commit c23928d070
5 changed files with 11 additions and 5 deletions

1
TODO
View file

@ -1,4 +1,3 @@
- some features (recent notes, linking to notes) don't work well with cloned notes
- when jumping to notes, tree does not scroll
- logout detection
- conflict detection

View file

@ -15,7 +15,7 @@
<div class="hide-toggle" style="width: 300px; height: 100%; float: left;">
<button type="button" class="btn" onclick="createNewTopLevelNote()">Create new note</button>
<div id="tree" style="overflow: scroll; height: 100%;">
<div id="tree">
</div>
</div>

View file

@ -1,6 +1,6 @@
$(function() {
$(window).resize(function() {
$('div#tree').height($(window).height() - $('div#tree').offset().top);
$('ul.fancytree-container').height($(window).height() - $('ul.fancytree-container').offset().top - 10);
$('div.note-editable').height($(window).height() - $('div.note-editable').offset().top);
});
$(window).resize();

View file

@ -176,7 +176,7 @@ function addRecentNote(noteId, noteTitle) {
// if it's already there, remove the note
recentNotes = recentNotes.filter(note => note.noteId !== noteId);
// console.log("added after " + (new Date().getTime() - origDate.getTime()));
console.log("added after " + (new Date().getTime() - origDate.getTime()));
recentNotes.unshift({
noteId: noteId,

View file

@ -23,4 +23,11 @@
.note-editable p {
padding: 0;
margin: 0;
}
}
ul.fancytree-container {
width: 290px;
height: 400px;
overflow: auto;
position: relative;
}