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

Side by Side Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 1010163002: Files.app: Fix closure error which will raised by the updated compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define FakeEntry record type and use it. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « ui/file_manager/gallery/js/mosaic_mode.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * Slide mode displays a single image and has a set of controls to navigate 6 * Slide mode displays a single image and has a set of controls to navigate
7 * between the images and to edit an image. 7 * between the images and to edit an image.
8 * 8 *
9 * @param {!HTMLElement} container Main container element. 9 * @param {!HTMLElement} container Main container element.
10 * @param {!HTMLElement} content Content container element. 10 * @param {!HTMLElement} content Content container element.
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 // Note that the SlideMode object is not listening to selection change yet. 553 // Note that the SlideMode object is not listening to selection change yet.
554 this.select(Math.max(0, this.getSelectedIndex())); 554 this.select(Math.max(0, this.getSelectedIndex()));
555 555
556 // Show the selected item ASAP, then complete the initialization 556 // Show the selected item ASAP, then complete the initialization
557 // (loading the ribbon thumbnails can take some time). 557 // (loading the ribbon thumbnails can take some time).
558 var selectedItem = this.getSelectedItem(); 558 var selectedItem = this.getSelectedItem();
559 this.displayedItem_ = selectedItem; 559 this.displayedItem_ = selectedItem;
560 560
561 // Load the image of the item. 561 // Load the image of the item.
562 this.loadItem_( 562 this.loadItem_(
563 selectedItem, 563 assert(selectedItem),
564 zoomFromRect ? 564 zoomFromRect ?
565 this.imageView_.createZoomEffect(zoomFromRect) : 565 this.imageView_.createZoomEffect(zoomFromRect) :
566 new ImageView.Effect.None(), 566 new ImageView.Effect.None(),
567 displayCallback, 567 displayCallback,
568 function(loadType, delay) { 568 function(loadType, delay) {
569 fulfill(delay); 569 fulfill(delay);
570 }); 570 });
571 }.bind(this)).then(function(delay) { 571 }.bind(this)).then(function(delay) {
572 // Turn the mode active. 572 // Turn the mode active.
573 this.active_ = true; 573 this.active_ = true;
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 var event = assertInstanceof(event, MouseEvent); 1865 var event = assertInstanceof(event, MouseEvent);
1866 var viewport = this.slideMode_.getViewport(); 1866 var viewport = this.slideMode_.getViewport();
1867 if (!this.enabled_ || !viewport.isZoomed()) 1867 if (!this.enabled_ || !viewport.isZoomed())
1868 return; 1868 return;
1869 this.stopOperation(); 1869 this.stopOperation();
1870 viewport.setOffset( 1870 viewport.setOffset(
1871 viewport.getOffsetX() + event.wheelDeltaX, 1871 viewport.getOffsetX() + event.wheelDeltaX,
1872 viewport.getOffsetY() + event.wheelDeltaY); 1872 viewport.getOffsetY() + event.wheelDeltaY);
1873 this.slideMode_.applyViewportChange(); 1873 this.slideMode_.applyViewportChange();
1874 }; 1874 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/mosaic_mode.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698