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

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

Issue 8423055: [Aura] Initial app list webui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: publish callbacks in ntp4 namespace Created 9 years, 1 month 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: chrome/browser/resources/ntp4/card_slider.js
diff --git a/chrome/browser/resources/ntp4/card_slider.js b/chrome/browser/resources/ntp4/card_slider.js
index ebe0cb60b2482f0b6c2cdb52e8dd5cfe3cbd79bb..6d721603a8571287f68542f9685ef82f165d34be 100644
--- a/chrome/browser/resources/ntp4/card_slider.js
+++ b/chrome/browser/resources/ntp4/card_slider.js
@@ -253,7 +253,7 @@ var CardSlider = (function() {
this.mouseWheelScrollAmount_ += e.wheelDeltaX;
if (Math.abs(this.mouseWheelScrollAmount_) >= 600) {
var pagesToScroll = this.mouseWheelScrollAmount_ > 0 ? 1 : -1;
- if (!ntp4.isRTL())
+ if (!isRTL())
pagesToScroll *= -1;
var newCardIndex = this.currentCard + pagesToScroll;
newCardIndex = Math.min(this.cards_.length - 1,
@@ -264,7 +264,7 @@ var CardSlider = (function() {
} else {
// For discrete devices, consider each wheel tick a page change.
var pagesToScroll = e.wheelDeltaX / DISCRETE_DELTA;
- if (!ntp4.isRTL())
+ if (!isRTL())
pagesToScroll *= -1;
var newCardIndex = this.currentCard + pagesToScroll;
newCardIndex = Math.min(this.cards_.length - 1,
@@ -352,8 +352,8 @@ var CardSlider = (function() {
*/
transformToCurrentCard_: function(opt_animate) {
this.currentLeft_ = -this.cardWidth_ *
- (ntp4.isRTL() ? this.cards_.length - this.currentCard - 1 :
- this.currentCard);
+ (isRTL() ? this.cards_.length - this.currentCard - 1 :
+ this.currentCard);
// Animate to the current card, which will either transition if the
// current card is new, or reset the existing card if we didn't drag

Powered by Google App Engine
This is Rietveld 408576698