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

Unified Diff: packages/charted/lib/core/interpolators/easing.dart

Issue 2213693002: Updated charted DEP to 0.4.X (Closed) Base URL: https://github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 4 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: packages/charted/lib/core/interpolators/easing.dart
diff --git a/packages/charted/lib/core/interpolators/easing.dart b/packages/charted/lib/core/interpolators/easing.dart
index e80bbd6f533b77262a00e6d1dc6b2e80e3c6d326..1cf833d1910f6a68786061d751dc530421a282b5 100644
--- a/packages/charted/lib/core/interpolators/easing.dart
+++ b/packages/charted/lib/core/interpolators/easing.dart
@@ -32,46 +32,6 @@ typedef num EasingFunction(num t);
/// altered [EasingFunction].
typedef EasingFunction EasingModeFunction(EasingFunction fn);
-/// Creates an easing function based on type and mode.
-EasingFunction easingFunctionByName(String type,
- [String mode = EASE_MODE_IN, List params]) {
- const Map easingTypes = const {
- EASE_TYPE_LINEAR: identityFunction,
- EASE_TYPE_POLY: easePoly,
- EASE_TYPE_QUAD: easeQuad,
- EASE_TYPE_CUBIC: easeCubic,
- EASE_TYPE_SIN: easeSin,
- EASE_TYPE_EXP: easeExp,
- EASE_TYPE_CIRCLE: easeCircle,
- EASE_TYPE_ELASTIC: easeElastic,
- EASE_TYPE_BACK: easeBack,
- EASE_TYPE_BOUNCE: easeBounce
- };
-
- const Map easingModes = const {
- EASE_MODE_IN: identityFunction,
- EASE_MODE_OUT: reverseEasingFn,
- EASE_MODE_IN_OUT: reflectEasingFn,
- EASE_MODE_OUT_IN: reflectReverseEasingFn
- };
-
- const Map customEasingFunctions = const {
- '$EASE_TYPE_CUBIC-$EASE_MODE_IN_OUT': easeCubicInOut
- };
-
- assert(easingTypes.containsKey(type));
- assert(easingModes.containsKey(mode));
-
- EasingFunction fn;
- if (customEasingFunctions.containsKey('$type-$mode')) {
- fn = Function.apply(customEasingFunctions['$type-$mode'], params);
- } else {
- fn = Function.apply(easingTypes[type], params);
- fn = easingModes[mode](fn);
- }
- return clampEasingFn(fn);
-}
-
/// Clamps transition progress to stay between 0.0 and 1.0
EasingFunction clampEasingFn(EasingFunction f) =>
(t) => t <= 0 ? 0 : t >= 1 ? 1 : f(t);
« no previous file with comments | « packages/charted/lib/charts/src/layout_area_impl.dart ('k') | packages/charted/lib/core/interpolators/interpolators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698