Skip to content

Commit db71225

Browse files
authored
Merge pull request #75 from ewilligers/avoid-next
Use web-animations.min.js
2 parents ade0daf + be28f42 commit db71225

File tree

7 files changed

+21
-18
lines changed

7 files changed

+21
-18
lines changed

animate_css/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
2424
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" />
2525
<link href="../resources/demo.css" rel="stylesheet" type="text/css" />
26-
<script src="../polyfill-loader.js"></script>
26+
<script src="../components/web-animations-js/web-animations.min.js"></script>
2727
<style>
2828

2929
body {
@@ -57,6 +57,7 @@
5757

5858
</style>
5959
<script>
60+
'use strict';
6061

6162
// a user must write this function from scratch and can use the others
6263
function moveText() {

expandoboard/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
55
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" />
66
<link href="../resources/demo.css" rel="stylesheet" type="text/css" />
7-
<script src="../polyfill-loader.js"></script>
7+
<script src="../components/web-animations-js/web-animations.min.js"></script>
88
<style>
99
body {
1010
margin: 16px;

galaxy/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<meta name="viewport" content="width=device-width">
2020

21-
<script src="../polyfill-loader.js"></script>
21+
<script src="../components/web-animations-js/web-animations.min.js"></script>
2222

2323
<body>
2424
<style>
@@ -75,3 +75,4 @@
7575
});
7676
}
7777
</script>
78+
</body>

hide-show/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<meta name="viewport" content="width=device-width, user-scalable=no">
1919

2020
<script src="../components/webcomponentsjs/webcomponents.js"></script>
21-
<script src="../polyfill-loader.js"></script>
21+
<script src="../components/web-animations-js/web-animations.min.js"></script>
2222

2323
<link rel="import" href="../components/polymer/polymer.html"></link>
2424
<link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>

playback-control/index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<meta name="viewport" content="width=device-width">
2020

21-
<script src="../polyfill-loader.js"></script>
21+
<script src="../components/web-animations-js/web-animations.min.js"></script>
2222
<script src="../components/webcomponentsjs/webcomponents.js"></script>
2323
<link href="https://fonts.googleapis.com/css?family=RobotoDraft:300" rel="stylesheet" type="text/css">
2424
<link rel="import" href="../components/core-icon-button/core-icon-button.html"></link>
@@ -120,28 +120,28 @@
120120
var iterations = 3;
121121
Polymer('playback-demo', {
122122
error: '',
123-
player: null,
123+
animation: null,
124124
progress: 0,
125125
play: function() {
126-
this.player.play();
126+
this.animation.play();
127127
},
128128
pause: function() {
129-
this.player.pause();
129+
this.animation.pause();
130130
},
131131
reverse: function() {
132-
this.player.reverse();
132+
this.animation.reverse();
133133
},
134134
finish: function() {
135-
this.player.finish();
135+
this.animation.finish();
136136
},
137137
trackstart: function() {
138-
this.player.pause();
138+
this.animation.pause();
139139
},
140140
track: function(e) {
141-
if (this.player.playState == 'paused') {
142-
var currentTime = this.player.currentTime += 3 * e.ddx;
141+
if (this.animation.playState == 'paused') {
142+
var currentTime = this.animation.currentTime += 3 * e.ddx;
143143
currentTime = Math.min(duration * iterations, Math.max(0, currentTime));
144-
this.player.currentTime = currentTime;
144+
this.animation.currentTime = currentTime;
145145
this.progress = currentTime / (duration * iterations);
146146
}
147147
},
@@ -166,7 +166,7 @@
166166
iterations: Infinity,
167167
});
168168

169-
this.player = this.$.target.animate([
169+
this.animation = this.$.target.animate([
170170
{transform: 'rotate(-45deg) scale(1)'},
171171
{transform: 'rotate(0) scale(2)'},
172172
{transform: 'rotate(45deg) scale(1)'},
@@ -178,7 +178,7 @@
178178
fill: 'both',
179179
});
180180

181-
if (!this.player.play) {
181+
if (!this.animation.play) {
182182
this.error = "Sorry, your browser doesn't support playback control.";
183183
return;
184184
}

ripple/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" />
66
<link href="../resources/demo.css" rel="stylesheet" type="text/css" />
77
<script src="../components/polymer/polymer.js"></script><!-- down/up events -->
8-
<script src="../polyfill-loader.js"></script>
8+
<script src="../components/web-animations-js/web-animations.min.js"></script>
99
<style>
1010
body {
1111
overflow: hidden;

spin/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
55
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" />
66
<link href="../resources/demo.css" rel="stylesheet" type="text/css" />
7-
<script src="../polyfill-loader.js"></script>
7+
<script src="../components/web-animations-js/web-animations.min.js"></script>
88
<style>
99
body {
1010
background: #0e7cf0;
@@ -31,6 +31,7 @@
3131
by <a href="https://dribbble.com/beesandbombs">Dave Whyte</a>
3232

3333
<script>
34+
'use strict';
3435
var layers = 9;
3536
var start = 4;
3637
for (var i = 1; i <= layers; i++) {

0 commit comments

Comments
 (0)