Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/js/core/directives/ui-grid-render-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
var scrollYAmount = event.deltaY * -1 * event.deltaFactor;

scrollTop = containerCtrl.viewport[0].scrollTop;

// Get the scroll percentage
var scrollYPercentage = (scrollTop + scrollYAmount) / rowContainer.getVerticalScrollLength();

Expand All @@ -98,7 +99,8 @@
}

// Let the parent container scroll if the grid is already at the top/bottom
if ((event.deltaY !== 0 && (scrollEvent.atTop(scrollTop) || scrollEvent.atBottom(scrollTop))) ||
if (rowContainer.getVerticalScrollLength() < 0 ||
(event.deltaY !== 0 && (scrollEvent.atTop(scrollTop) || scrollEvent.atBottom(scrollTop))) ||
(event.deltaX !== 0 && (scrollEvent.atLeft(scrollLeft) || scrollEvent.atRight(scrollLeft)))) {
//parent controller scrolls
}
Expand Down