Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
polymer-scrub: basic scrubbing element
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Aug 26, 2013
1 parent ea7e426 commit a944cf0
Show file tree
Hide file tree
Showing 2 changed files with 412 additions and 0 deletions.
67 changes: 67 additions & 0 deletions polymer-scrub/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!doctype html>
<html>
<head>
<title>Scrubbing</title>
<link href="../polymer-animation/polymer-animation.html" rel="import">
<link href="polymer-scrub.html" rel="import">
<script src="../../polymer/polymer.js"></script>
</head>
<body>
<polymer-element name="scrub-demo">
<template>
<style>
.container {
position: relative;
height: 100px;
width: 900px;
background: whitesmoke;
border: 1px solid gray;
}
.circle {
position: absolute;
box-sizing: border-box;
border-radius: 50px;
left: 0;
top: 0;
height: 100px;
width: 100px;
line-height: 100px;
text-align: center;
background: lightblue;
border: 1px solid gray;
}
</style>
<div id="c" class="container container2">
<div id="c2" class="circle">&perp;</div>
</div>
<polymer-animation id="anim" target="{{$.c2}}" duration="3" fillMode="both">
<polymer-animation-keyframe>
<polymer-animation-prop name="transform" value="translate(0px, 0px) rotate(0deg)"></polymer-animation-prop>
<polymer-animation-prop name="opacity" value="1"></polymer-animation-prop>
</polymer-animation-keyframe>
<polymer-animation-keyframe>
<polymer-animation-prop name="transform" value="translate(200px, 0px) rotate(360deg)"></polymer-animation-prop>
<polymer-animation-prop name="opacity" value="1"></polymer-animation-prop>
</polymer-animation-keyframe>
<polymer-animation-keyframe>
<polymer-animation-prop name="transform" value="translate(400px, 0px) rotate(720deg)"></polymer-animation-prop>
<polymer-animation-prop name="opacity" value="0.5"></polymer-animation-prop>
</polymer-animation-keyframe>
<polymer-animation-keyframe>
<polymer-animation-prop name="transform" value="translate(600px, 0px) rotate(1080deg)"></polymer-animation-prop>
<polymer-animation-prop name="opacity" value="1"></polymer-animation-prop>
</polymer-animation-keyframe>
<polymer-animation-keyframe>
<polymer-animation-prop name="transform" value="translate(800px, 0px) rotate(1440deg)"></polymer-animation-prop>
<polymer-animation-prop name="opacity" value="1"></polymer-animation-prop>
</polymer-animation-keyframe>
</polymer-animation>
<polymer-scrub target="{{$.c}}" animation="{{$.anim.animation}}"></polymer-scrub>
</template>
<script>
Polymer('scrub-demo');
</script>
</polymer-element>
<scrub-demo></scrub-demo>
</body>
</html>
Loading

0 comments on commit a944cf0

Please sign in to comment.