Skip to content

Commit 5e9d743

Browse files
committed
add scroll top to src/jscrollpane.coffee
1 parent b334bbd commit 5e9d743

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/jscrollpane.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ angular
2020
$timeout(fn, $scope.$eval($attrs.scrollTimeout))
2121
else
2222
$timeout(fn, 0)
23+
$scope.$watch (->
24+
$attrs.scrollAlwaysTop
25+
), (newVal, oldVal) ->
26+
if newVal and $scope.pane
27+
$scope.pane.scrollToY 0
28+
return
2329
$scope.$on("reinit-pane", (event, id) ->
2430
if id is $attrs.id and $scope.pane
2531
console.log("Reinit pane #{id}")

0 commit comments

Comments
 (0)