scrolling fixes
This commit is contained in:
@@ -98,12 +98,12 @@ FileManager.prototype.renderVisibleFiles = function(files, freshStart) {
|
||||
let scrollDown = this.lastScrollTop <= this.directoryArea.scrollTop;
|
||||
this.lastScrollTop = this.directoryArea.scrollTop;
|
||||
|
||||
let fileHeight = 28;
|
||||
let totalHeight = (files.length * fileHeight)+16;
|
||||
let viewportHeight = this.directoryArea.clientHeight+100;
|
||||
let paddingTop = this.directoryArea.scrollTop-100;
|
||||
let fileHeight = 32;
|
||||
let totalHeight = (files.length * fileHeight)+38;
|
||||
let viewportHeight = this.directoryArea.clientHeight;
|
||||
let paddingTop = this.lastScrollTop - this.lastScrollTop%fileHeight;
|
||||
if (paddingTop < 0) { paddingTop = 0;}
|
||||
let paddingBottom = totalHeight - paddingTop - viewportHeight;
|
||||
let paddingBottom = totalHeight - paddingTop - viewportHeight - this.lastScrollTop%fileHeight;
|
||||
if (paddingBottom < 0) {paddingBottom = 0;}
|
||||
|
||||
// Pad the items out which we're not going to show
|
||||
@@ -126,8 +126,6 @@ FileManager.prototype.renderVisibleFiles = function(files, freshStart) {
|
||||
lastEl = this.dirContainer.lastElementChild;
|
||||
lastIdx = Number.parseInt(lastEl.getAttribute("fileindex"));
|
||||
|
||||
this.dirContainer.insert
|
||||
|
||||
if (firstIdx < start) {
|
||||
this.dirContainer.removeChild(firstEl);
|
||||
console.debug("Remove start "+firstIdx);
|
||||
@@ -141,7 +139,6 @@ FileManager.prototype.renderVisibleFiles = function(files, freshStart) {
|
||||
|
||||
console.debug("Start "+start+" end "+end+" first el "+firstIdx+" last el "+lastIdx);
|
||||
|
||||
|
||||
let makeButton = (i, file) => {
|
||||
let el = document.createElement("a");
|
||||
el.classList = "node";
|
||||
|
@@ -39,8 +39,7 @@
|
||||
flex-shrink: 1;
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
/* padding: 0; */
|
||||
padding: 8px;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
text-align: left;
|
||||
@@ -55,8 +54,7 @@
|
||||
position: relative;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin: 8px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
color: var(--text_color);
|
||||
|
Reference in New Issue
Block a user