This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polymer-scrub: basic scrubbing element
- Loading branch information
Yvonne Yip
committed
Aug 26, 2013
1 parent
ea7e426
commit a944cf0
Showing
2 changed files
with
412 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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">⊥</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> |
Oops, something went wrong.