Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components / neon-animation / neon-animation-behavior.html
blob107d753a7fcd0773560bde7caaff424490874a3e
1 <!--
2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 -->
11 <link rel="import" href="../polymer/polymer.html">
12 <link rel="import" href="../iron-meta/iron-meta.html">
14 <script>
16 /**
17 * Use `Polymer.NeonAnimationBehavior` to implement an animation.
18 * @polymerBehavior
20 Polymer.NeonAnimationBehavior = {
22 properties: {
24 /**
25 * Defines the animation timing.
27 animationTiming: {
28 type: Object,
29 value: function() {
30 return {
31 duration: 500,
32 easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
33 fill: 'both'
40 registered: function() {
41 new Polymer.IronMeta({type: 'animation', key: this.is, value: this.constructor});
44 /**
45 * Do any animation configuration here.
47 // configure: function(config) {
48 // },
50 /**
51 * Returns the animation timing by mixing in properties from `config` to the defaults defined
52 * by the animation.
54 timingFromConfig: function(config) {
55 if (config.timing) {
56 for (var property in config.timing) {
57 this.animationTiming[property] = config.timing[property];
60 return this.animationTiming;
63 /**
64 * Sets `transform` and `transformOrigin` properties along with the prefixed versions.
66 setPrefixedProperty: function(node, property, value) {
67 var map = {
68 'transform': ['webkitTransform'],
69 'transformOrigin': ['mozTransformOrigin', 'webkitTransformOrigin']
71 var prefixes = map[property];
72 for (var prefix, index = 0; prefix = prefixes[index]; index++) {
73 node.style[prefix] = value;
75 node.style[property] = value;
78 /**
79 * Called when the animation finishes.
81 complete: function() {}
85 </script>