浏览代码

[home2] Include borders in foreachVisible height calculations

Johan Ahlen 9 年之前
父节点
当前提交
8513672265

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3108,7 +3108,7 @@
         $.each(renderedElements, function (idx, renderedElement) {
         $.each(renderedElements, function (idx, renderedElement) {
           // TODO: Figure out why it goes over index at the end scroll position
           // TODO: Figure out why it goes over index at the end scroll position
           if (startIndex + idx < lastKnownHeights.length) {
           if (startIndex + idx < lastKnownHeights.length) {
-            var renderedHeight = $(renderedElement).height();
+            var renderedHeight = $(renderedElement).outerHeight(true);
             if (lastKnownHeights[startIndex + idx] !== renderedHeight) {
             if (lastKnownHeights[startIndex + idx] !== renderedHeight) {
               lastKnownHeights[startIndex + idx] = renderedHeight;
               lastKnownHeights[startIndex + idx] = renderedHeight;
               diff = true;
               diff = true;

+ 4 - 1
desktop/core/src/desktop/templates/file_browser.mako

@@ -113,9 +113,12 @@ from desktop.views import _ko
       line-height: 50px;
       line-height: 50px;
     }
     }
 
 
+    .fb-list {
+      padding: 4px 0;
+    }
+
     .fb-list ul {
     .fb-list ul {
       list-style: none;
       list-style: none;
-      padding: 4px 0;
       margin: 0;
       margin: 0;
     }
     }