| Index: ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js b/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| index 5b91925f3da2d3ceacdb8f57cd967cae3c8d6712..2c8aa6dd304223bca6c310cbf430e580c76160c3 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| @@ -264,11 +264,27 @@ ThumbnailLoader.prototype.loadAsDataUrl = function(fillMode) {
|
| this.metadata_.filesystem &&
|
| this.metadata_.filesystem.modificationTime &&
|
| this.metadata_.filesystem.modificationTime.getTime();
|
| - var thumbnailUrl =
|
| - fillMode === ThumbnailLoader.FillMode.OVER_FILL &&
|
| - this.croppedThumbnailUrl_ ?
|
| - this.croppedThumbnailUrl_ :
|
| - this.thumbnailUrl_;
|
| + var thumbnailUrl = this.thumbnailUrl_;
|
| + var options = {
|
| + maxWidth: ThumbnailLoader.THUMBNAIL_MAX_WIDTH,
|
| + maxHeight: ThumbnailLoader.THUMBNAIL_MAX_HEIGHT,
|
| + cache: true,
|
| + priority: this.priority_,
|
| + timestamp: modificationTime
|
| + };
|
| +
|
| + if (fillMode === ThumbnailLoader.FillMode.OVER_FILL) {
|
| + // Use cropped thumbnail url if available.
|
| + thumbnailUrl = this.croppedThumbnailUrl_ ?
|
| + this.croppedThumbnailUrl_ : this.thumbnailUrl_;
|
| +
|
| + // Set crop option to image loader. Since image of croppedThumbnailUrl_ is
|
| + // 360x360 with current implemenation, it's no problem to crop it.
|
| + options['width'] = 360;
|
| + options['height'] = 360;
|
| + options['crop'] = true;
|
| + }
|
| +
|
| ImageLoaderClient.getInstance().load(
|
| thumbnailUrl,
|
| function(result) {
|
| @@ -277,13 +293,7 @@ ThumbnailLoader.prototype.loadAsDataUrl = function(fillMode) {
|
| else
|
| reject(result);
|
| },
|
| - {
|
| - maxWidth: ThumbnailLoader.THUMBNAIL_MAX_WIDTH,
|
| - maxHeight: ThumbnailLoader.THUMBNAIL_MAX_HEIGHT,
|
| - cache: true,
|
| - priority: this.priority_,
|
| - timestamp: modificationTime
|
| - });
|
| + options);
|
| }.bind(this)).then(function(result) {
|
| if (!this.transform_)
|
| return result;
|
|
|