Skip to content

Commit b334bbd

Browse files
committed
always scroll to top
1 parent 7d63b61 commit b334bbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dist/angular-jscrollpane.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
} else {
2727
$timeout(fn, 0);
2828
}
29+
$scope.$watch(function () { return $attrs.scrollAlwaysTop; }, function (newVal, oldVal) {
30+
if (newVal && $scope.pane) $scope.pane.scrollToY(0);
31+
});
2932
return $scope.$on("reinit-pane", function(event, id) {
3033
if (id === $attrs.id && $scope.pane) {
3134
console.log("Reinit pane " + id);

0 commit comments

Comments
 (0)