]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix Escalator spacer visibility calucation (#17826)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Wed, 10 Jun 2015 12:34:45 +0000 (15:34 +0300)
committerJohannes Dahlström <johannesd@vaadin.com>
Wed, 10 Jun 2015 14:08:11 +0000 (17:08 +0300)
Now calls directly to correct spacer container to update visibility
instead of doing extra work with recalculating everything.

Change-Id: I8625033012773a10983cd5d4f6ef3ce1be50ee26

client/src/com/vaadin/client/widgets/Escalator.java

index 45c8267d53d200ba58ece98ce4681b0cbe7375e5..3990683e64fffbe58edaa74ef1e5eaee549e9f04 100644 (file)
@@ -1278,7 +1278,7 @@ public class Escalator extends Widget implements RequiresResize,
          * <p>
          * The implementation must call {@link #paintRemoveRow(Element, int)}
          * for each row that is removed from the DOM.
-         *
+         * 
          * @param index
          *            the logical index of the first removed row
          * @param numberOfRows
@@ -4994,7 +4994,8 @@ public class Escalator extends Widget implements RequiresResize,
                 spacerScrollerRegistration.removeHandler();
                 spacerScrollerRegistration = null;
             }
-            recalculateElementSizes();
+
+            updateSpacerDecosVisibility();
         }
 
         public Map<Integer, SpacerImpl> getSpacers() {
@@ -5305,7 +5306,7 @@ public class Escalator extends Widget implements RequiresResize,
             initSpacerContent(spacer);
 
             body.sortDomElements();
-            recalculateElementSizes();
+            updateSpacerDecosVisibility();
         }
 
         private void updateExistingSpacer(int rowIndex, double newHeight) {
@@ -6286,7 +6287,6 @@ public class Escalator extends Widget implements RequiresResize,
         body.recalculateSectionHeight();
         footer.recalculateSectionHeight();
 
-        body.spacerContainer.updateSpacerDecosVisibility();
         scroller.recalculateScrollbarsForVirtualViewport();
         body.verifyEscalatorCount();
         body.reapplySpacerWidths();