Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 78fa18a

Browse files
committed
ANCHOR SCROLL: WIP - feat($anchorScroll): add support for configurable
scroll offset Fixed the dynamic scroll offset example in the docs.
1 parent 3a86605 commit 78fa18a

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/ng/anchorScroll.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@
6161
* @example
6262
<example module="anchorScrollOffsetExample">
6363
<file name="index.html">
64-
<div class="scroll-area">
65-
<div class="fixed-header" ng-controller="headerCtrl">
66-
<a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
67-
Go to anchor {{x}}
68-
</a>
69-
</div>
70-
<div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
71-
Anchor {{x}} of 5
72-
</div>
64+
<div class="fixed-header" ng-controller="headerCtrl">
65+
<a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
66+
Go to anchor {{x}}
67+
</a>
68+
</div>
69+
<div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
70+
Anchor {{x}} of 5
7371
</div>
7472
</file>
7573
<file name="script.js">
@@ -91,9 +89,13 @@
9189
]);
9290
</file>
9391
<file name="style.css">
92+
body {
93+
padding-top: 50px;
94+
}
95+
9496
.anchor {
9597
border: 2px dashed DarkOrchid;
96-
padding-bottom: 200px;
98+
padding: 10px 10px 200px 10px;
9799
}
98100
99101
.fixed-header {
@@ -107,12 +109,6 @@
107109
display: inline-block;
108110
margin: 5px 15px;
109111
}
110-
111-
.scroll-area {
112-
height: 230px;
113-
overflow: auto;
114-
padding-top: 50px;
115-
}
116112
</file>
117113
</example>
118114
*/

0 commit comments

Comments
 (0)