@@ -401,15 +401,20 @@ FocusScope {
401 // to the next, we set the visible range to the viewport so
401 // to the next, we set the visible range to the viewport so
402 // items are not culled (invisible) but still use no cacheBuffer
402 // items are not culled (invisible) but still use no cacheBuffer
403 // (it will be set once the scope is the current one)
403 // (it will be set once the scope is the current one)
404− var displayMarginBeginning = Math.round(-Math.max(-baseItem.y, 0));
404+ var displayMarginBeginning = baseItem.y;
405− var displayMarginEnd = -Math.round(Math.max(baseItem.height - seeAll.height -
405+ displayMarginBeginning = -Math.max(-displayMarginBeginning, 0);
406+ displayMarginBeginning = -Math.min(-displayMarginBeginning, baseItem.height);
407+ displayMarginBeginning = Math.round(displayMarginBeginning);
406− categoryView.height + baseItem.y, 0));
408+ var displayMarginEnd = -baseItem.height + seeAll.height + categoryView.height - baseItem.y;
409+ displayMarginEnd = -Math.max(-displayMarginEnd, 0);
410+ displayMarginEnd = -Math.min(-displayMarginEnd, baseItem.height);
411+ displayMarginEnd = Math.round(displayMarginEnd);
407 if (scopeView.isCurrent || scopeView.visibleToParent) {
412 if (scopeView.isCurrent || scopeView.visibleToParent) {
408 item.displayMarginBeginning = displayMarginBeginning;
413 item.displayMarginBeginning = displayMarginBeginning;
409 item.displayMarginEnd = displayMarginEnd;
414 item.displayMarginEnd = displayMarginEnd;
410 item.cacheBuffer = scopeView.isCurrent ? categoryView.height * 1.5 : 0;
415 item.cacheBuffer = scopeView.isCurrent ? categoryView.height * 1.5 : 0;
412− var visibleRange = baseItem.height + displayMarginEnd - displayMarginBeginning;
417+ var visibleRange = baseItem.height + displayMarginEnd + displayMarginBeginning;
413 if (visibleRange < 0) {
418 if (visibleRange < 0) {
414 item.displayMarginBeginning = displayMarginBeginning;
419 item.displayMarginBeginning = displayMarginBeginning;
415 item.displayMarginEnd = displayMarginEnd;
420 item.displayMarginEnd = displayMarginEnd;