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

Unified Diff: chrome/browser/resources/ntp4/nav_dot.js

Issue 9116037: [NTP4] Make TilePage and CardSlider evented to simplify code and fix page switcher bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: found one more bug when you leave a tab while mousing over page switcher Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/nav_dot.js
diff --git a/chrome/browser/resources/ntp4/nav_dot.js b/chrome/browser/resources/ntp4/nav_dot.js
index 1686e80f1755079338db5f1c3455f6249c298e79..98c3d975b21ca7a57d2ee18dff804f118a8f6169 100644
--- a/chrome/browser/resources/ntp4/nav_dot.js
+++ b/chrome/browser/resources/ntp4/nav_dot.js
@@ -92,10 +92,15 @@ cr.define('ntp4', function() {
},
/**
- * Removes the dot from the page after transitioning to 0 width.
+ * Removes the dot from the page. If |opt_animate| is truthy, we first
+ * transition the element to 0 width.
+ * @param {boolean=} opt_animate Whether to animate the removal or not.
*/
- animateRemove: function() {
- this.classList.add('small');
+ remove: function(opt_animate) {
+ if (opt_animate)
+ this.classList.add('small');
+ else
+ this.parentNode.removeChild(this);
},
/**
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698