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

Unified Diff: athena/home/home_card_gesture_manager.cc

Issue 478293004: Refactor the home card structure and introduce animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/home_card_gesture_manager.cc
diff --git a/athena/home/home_card_gesture_manager.cc b/athena/home/home_card_gesture_manager.cc
index 755c29cfd79133f68e43a19b4a57bfca1193ad4e..15a6e345563035316524bc1523abe8c761be5d2e 100644
--- a/athena/home/home_card_gesture_manager.cc
+++ b/athena/home/home_card_gesture_manager.cc
@@ -99,6 +99,7 @@ void HomeCardGestureManager::UpdateScrollState(const ui::GestureEvent& event) {
// The finger is between two states.
float progress = (last_estimated_height_ - smaller_height) /
(bigger_height - smaller_height);
+ progress = std::min(1.0f, std::max(0.0f, progress));
if (last_state_ == state) {
if (event.details().scroll_y() > 0) {
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698