| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Animation.AnimationUI = class { | 7 Animation.AnimationUI = class { |
| 8 /** | 8 /** |
| 9 * @param {!Animation.AnimationModel.Animation} animation | 9 * @param {!Animation.AnimationModel.Animation} animation |
| 10 * @param {!Animation.AnimationTimeline} timeline | 10 * @param {!Animation.AnimationTimeline} timeline |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 */ | 168 */ |
| 169 function createStepLine(parentElement, x, strokeColor) { | 169 function createStepLine(parentElement, x, strokeColor) { |
| 170 var line = parentElement.createSVGChild('line'); | 170 var line = parentElement.createSVGChild('line'); |
| 171 line.setAttribute('x1', x); | 171 line.setAttribute('x1', x); |
| 172 line.setAttribute('x2', x); | 172 line.setAttribute('x2', x); |
| 173 line.setAttribute('y1', Animation.AnimationUI.Options.AnimationMargin); | 173 line.setAttribute('y1', Animation.AnimationUI.Options.AnimationMargin); |
| 174 line.setAttribute('y2', Animation.AnimationUI.Options.AnimationHeight); | 174 line.setAttribute('y2', Animation.AnimationUI.Options.AnimationHeight); |
| 175 line.style.stroke = strokeColor; | 175 line.style.stroke = strokeColor; |
| 176 } | 176 } |
| 177 | 177 |
| 178 var bezier = Common.Geometry.CubicBezier.parse(easing); | 178 var bezier = UI.Geometry.CubicBezier.parse(easing); |
| 179 var cache = this._cachedElements[iteration].keyframeRender; | 179 var cache = this._cachedElements[iteration].keyframeRender; |
| 180 if (!cache[keyframeIndex]) { | 180 if (!cache[keyframeIndex]) { |
| 181 cache[keyframeIndex] = bezier ? parentElement.createSVGChild('path', 'anim
ation-keyframe') : | 181 cache[keyframeIndex] = bezier ? parentElement.createSVGChild('path', 'anim
ation-keyframe') : |
| 182 parentElement.createSVGChild('g', 'animati
on-keyframe-step'); | 182 parentElement.createSVGChild('g', 'animati
on-keyframe-step'); |
| 183 } | 183 } |
| 184 var group = cache[keyframeIndex]; | 184 var group = cache[keyframeIndex]; |
| 185 group.style.transform = 'translateX(' + leftDistance.toFixed(2) + 'px)'; | 185 group.style.transform = 'translateX(' + leftDistance.toFixed(2) + 'px)'; |
| 186 | 186 |
| 187 if (easing === 'linear') { | 187 if (easing === 'linear') { |
| 188 group.style.fill = this._color; | 188 group.style.fill = this._color; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 'Light Blue': Common.Color.parse('#03A9F4'), | 404 'Light Blue': Common.Color.parse('#03A9F4'), |
| 405 'Deep Orange': Common.Color.parse('#FF5722'), | 405 'Deep Orange': Common.Color.parse('#FF5722'), |
| 406 'Blue': Common.Color.parse('#5677FC'), | 406 'Blue': Common.Color.parse('#5677FC'), |
| 407 'Lime': Common.Color.parse('#CDDC39'), | 407 'Lime': Common.Color.parse('#CDDC39'), |
| 408 'Blue Grey': Common.Color.parse('#607D8B'), | 408 'Blue Grey': Common.Color.parse('#607D8B'), |
| 409 'Pink': Common.Color.parse('#E91E63'), | 409 'Pink': Common.Color.parse('#E91E63'), |
| 410 'Green': Common.Color.parse('#0F9D58'), | 410 'Green': Common.Color.parse('#0F9D58'), |
| 411 'Brown': Common.Color.parse('#795548'), | 411 'Brown': Common.Color.parse('#795548'), |
| 412 'Cyan': Common.Color.parse('#00BCD4') | 412 'Cyan': Common.Color.parse('#00BCD4') |
| 413 }; | 413 }; |
| OLD | NEW |