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

Side by Side Diff: chrome/browser/resources/ntp4/page_list_view.js

Issue 8775024: Fix NTP not to slide with mouse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't include tweak to enable Xinput2 Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/tools/check.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview PageListView implementation. 6 * @fileoverview PageListView implementation.
7 * PageListView manages page list, dot list, switcher buttons and handles apps 7 * PageListView manages page list, dot list, switcher buttons and handles apps
8 * pages callbacks from backend. 8 * pages callbacks from backend.
9 * 9 *
10 * Note that you need to have AppLauncherHandler in your WebUI to use this code. 10 * Note that you need to have AppLauncherHandler in your WebUI to use this code.
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if (this.cardSlider.currentCard >= tempIndex) 432 if (this.cardSlider.currentCard >= tempIndex)
433 this.cardSlider.currentCard += 1; 433 this.cardSlider.currentCard += 1;
434 this.updateSliderCards(); 434 this.updateSliderCards();
435 435
436 if (ntp4.getCurrentlyDraggingTile().firstChild.canBeRemoved()) 436 if (ntp4.getCurrentlyDraggingTile().firstChild.canBeRemoved())
437 $('footer').classList.add('showing-trash-mode'); 437 $('footer').classList.add('showing-trash-mode');
438 }, 438 },
439 439
440 /** 440 /**
441 * Invoked whenever some app is released 441 * Invoked whenever some app is released
442 * @param {cr.ui.Grabber.Event} e The Grabber RELEASE event.
443 */ 442 */
444 leaveRearrangeMode: function(e) { 443 leaveRearrangeMode: function() {
445 var tempPage = document.querySelector('.tile-page.temporary'); 444 var tempPage = document.querySelector('.tile-page.temporary');
446 var dot = tempPage.navigationDot; 445 var dot = tempPage.navigationDot;
447 if (!tempPage.tileCount && tempPage != this.cardSlider.currentCardValue) { 446 if (!tempPage.tileCount && tempPage != this.cardSlider.currentCardValue) {
448 dot.animateRemove(); 447 dot.animateRemove();
449 var tempIndex = Array.prototype.indexOf.call(this.tilePages, tempPage); 448 var tempIndex = Array.prototype.indexOf.call(this.tilePages, tempPage);
450 if (this.cardSlider.currentCard > tempIndex) 449 if (this.cardSlider.currentCard > tempIndex)
451 this.cardSlider.currentCard -= 1; 450 this.cardSlider.currentCard -= 1;
452 tempPage.parentNode.removeChild(tempPage); 451 tempPage.parentNode.removeChild(tempPage);
453 this.updateSliderCards(); 452 this.updateSliderCards();
454 } else { 453 } else {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 this.cardSlider.selectCard(cardIndex, true); 612 this.cardSlider.selectCard(cardIndex, true);
614 613
615 e.stopPropagation(); 614 e.stopPropagation();
616 } 615 }
617 }; 616 };
618 617
619 return { 618 return {
620 PageListView: PageListView 619 PageListView: PageListView
621 }; 620 };
622 }); 621 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/tools/check.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698