1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 is: 'viewer-zoom-button',
9 Polymer.NeonAnimationRunnerBehavior
24 computed: 'computeAnimationConfig(delay)'
28 computeAnimationConfig: function(delay) {
31 name: 'transform-animation',
34 easing: 'cubic-bezier(0, 0, 0.2, 1)',
38 transformFrom: 'translateX(100%)'
41 name: 'transform-animation',
44 easing: 'cubic-bezier(0.4, 0, 1, 1)',
48 transformTo: 'translateX(100%)'
54 'neon-animation-finish': '_onAnimationFinished'
57 _onAnimationFinished: function() {
58 this.style.transform = this.opened ? 'none' : 'translateX(100%)';
73 this.opened = !this.opened;
74 this.cancelAnimation();
75 this.playAnimation(this.opened ? 'entry' : 'exit');