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

Unified Diff: Source/devtools/front_end/elements/BezierUI.js

Issue 967213002: Devtools Animations: Represent delay and end-delay on the animation timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Round values Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/elements/BezierUI.js
diff --git a/Source/devtools/front_end/elements/BezierUI.js b/Source/devtools/front_end/elements/BezierUI.js
index 8eda79a9984bb7d28b84b4d08fe9a05ffc13edeb..2a9b716fd317eb9e730c768dfb4878a302543c40 100644
--- a/Source/devtools/front_end/elements/BezierUI.js
+++ b/Source/devtools/front_end/elements/BezierUI.js
@@ -117,9 +117,9 @@ WebInspector.BezierUI.drawVelocityChart = function(bezier, path, width)
var slope = (current.y - prev.y) / (current.x - prev.x);
var weightedX = prev.x * (1 - t) + current.x * t;
slope = Math.tanh(slope / 1.5); // Normalise slope
- pathBuilder = pathBuilder.concat(["L", weightedX * width, height - slope * height ]);
+ pathBuilder = pathBuilder.concat(["L", (weightedX * width).toFixed(2), (height - slope * height).toFixed(2) ]);
prev = current;
}
- pathBuilder = pathBuilder.concat(["L", width, height, "Z"]);
+ pathBuilder = pathBuilder.concat(["L", width.toFixed(2), height, "Z"]);
path.setAttribute("d", pathBuilder.join(" "));
}
« no previous file with comments | « Source/devtools/front_end/elements/AnimationTimeline.js ('k') | Source/devtools/front_end/elements/animationTimeline.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698