Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationUI.js

Issue 2623743002: DevTools: extract modules (non-extensions) (Closed)
Patch Set: rebaseline Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
189 var height = UI.BezierUI.Height; 189 var height = InlineEditor.BezierUI.Height;
190 group.setAttribute( 190 group.setAttribute(
191 'd', ['M', 0, height, 'L', 0, 5, 'L', width.toFixed(2), 5, 'L', width. toFixed(2), height, 'Z'].join(' ')); 191 'd', ['M', 0, height, 'L', 0, 5, 'L', width.toFixed(2), 5, 'L', width. toFixed(2), height, 'Z'].join(' '));
192 } else if (bezier) { 192 } else if (bezier) {
193 group.style.fill = this._color; 193 group.style.fill = this._color;
194 UI.BezierUI.drawVelocityChart(bezier, group, width); 194 InlineEditor.BezierUI.drawVelocityChart(bezier, group, width);
195 } else { 195 } else {
196 var stepFunction = Animation.AnimationTimeline.StepTimingFunction.parse(ea sing); 196 var stepFunction = Animation.AnimationTimeline.StepTimingFunction.parse(ea sing);
197 group.removeChildren(); 197 group.removeChildren();
198 /** @const */ var offsetMap = {'start': 0, 'middle': 0.5, 'end': 1}; 198 /** @const */ var offsetMap = {'start': 0, 'middle': 0.5, 'end': 1};
199 /** @const */ var offsetWeight = offsetMap[stepFunction.stepAtPosition]; 199 /** @const */ var offsetWeight = offsetMap[stepFunction.stepAtPosition];
200 for (var i = 0; i < stepFunction.steps; i++) 200 for (var i = 0; i < stepFunction.steps; i++)
201 createStepLine(group, (i + offsetWeight) * width / stepFunction.steps, t his._color); 201 createStepLine(group, (i + offsetWeight) * width / stepFunction.steps, t his._color);
202 } 202 }
203 } 203 }
204 204
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698