Skip to content

Commit 0fece81

Browse files
committed
fix demo
1 parent 8743f35 commit 0fece81

File tree

8 files changed

+58
-77
lines changed

8 files changed

+58
-77
lines changed

all-imports.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<link rel="import" href="iron-auto-scroll-spy.html">
2+
<link rel="import" href="iron-scroll-spy.html">

demo/auto-scroll-spy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<paper-tab>Section D</paper-tab>
4848
</paper-tabs>
4949
</paper-toolbar>
50-
<iron-auto-scroll-spy selected="{{scrollSelected}}" id="autoScroll">
50+
<iron-auto-scroll-spy selected="{{scrollSelected}}" fallback-selection="2" id="autoScroll">
5151
<div>
5252
<h1>Section A</h1>
5353
<span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis, provident asperiores. Itaque quas architecto commodi, quam dicta beatae blanditiis obcaecati, voluptatibus, quisquam sint necessitatibus aliquid vero sunt dolor iusto quos!</span>

demo/index.html

Lines changed: 0 additions & 71 deletions
This file was deleted.

demo/routing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<body unresolved>
4545

4646
<template is="dom-bind" id="scope">
47-
<app-location route="{{route}}" use-hash-as-path></app-location>
47+
<app-location route="{{route}}" hash="#"></app-location>
4848
<app-route
4949
route="{{route}}"
5050
pattern="/:section"

demo/scroll-spy.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!doctype html>
2+
<!--
3+
@license
4+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8+
Code distributed by Google as part of the polymer project is also
9+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10+
-->
11+
<html>
12+
<head>
13+
<meta charset="utf-8">
14+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
15+
<title>iron-scroll-spy Demo</title>
16+
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
17+
<link rel="import" href="../iron-scroll-spy.html">
18+
</head>
19+
<style>
20+
body {
21+
margin: 0;
22+
height: 100vh;
23+
}
24+
iron-scroll-spy div {
25+
padding: 180px;
26+
}
27+
iron-scroll-spy div.iron-selected {
28+
background: lightgrey;
29+
}
30+
</style>
31+
<body unresolved>
32+
33+
<template is="dom-bind" id="scope">
34+
<iron-scroll-spy selected="{{scrollSelected}}" id="scrollSpy">
35+
<div>
36+
<h1>Section A</h1>
37+
</div>
38+
<div>
39+
<h1>Section B</h1>
40+
</div>
41+
<div>
42+
<h1>Section C</h1>
43+
</div>
44+
<div>
45+
<h1>Section D</h1>
46+
</div>
47+
</iron-scroll-spy>
48+
</template>
49+
50+
</body>
51+
</html>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
match the folder name, add a src="&lt;main-component&gt;.html" attribute,
2424
where &lt;main-component&gt;.html" is a file that imports all of the
2525
components you want documented. -->
26-
<iron-component-page></iron-component-page>
26+
<iron-component-page src="all-imports.html"></iron-component-page>
2727

2828
</body>
2929
</html>

iron-auto-scroll-spy.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
Specify the scroll-target and it will select the current element in the viewport as the scroll change.
1717
Change the selected attribute will result in a smooth scroll to the associated element.
1818
19-
@demo demo/index.html
20-
@demo demo/routing.html
19+
@demo demo/auto-scroll-spy.html
2120
@hero hero.svg
2221
-->
2322

iron-scroll-spy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Specify the scroll-target and it will select the current element in the viewport as the scroll change.
1717
Change the selected attribute will result in a smooth scroll to the associated element.
1818
19-
@demo demo/index.html
19+
@demo demo/scroll-spy.html
2020
@demo demo/routing.html
2121
@hero hero.svg
2222
-->

0 commit comments

Comments
 (0)