Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / file_manager / gallery / js / mosaic_mode.js
index 78af4d8..6e14073 100644 (file)
@@ -1284,10 +1284,10 @@ Mosaic.Column.prototype.getEdgeTileIndex_ = function(y, direction) {
  * @return {Mosaic.Row} The row containing the tile with a given index.
  */
 Mosaic.Column.prototype.getRowByTileIndex = function(index) {
-  for (var r = 0; r !== this.rows_.length; r++)
+  for (var r = 0; r !== this.rows_.length; r++) {
     if (this.rows_[r].hasTile(index))
       return this.rows_[r];
-
+  }
   return null;
 };
 
@@ -1300,7 +1300,7 @@ Mosaic.Column.prototype.add = function(tile) {
   var rowIndex = this.getNextRowIndex();
 
   if (!this.newRow_)
-     this.newRow_ = new Mosaic.Row(this.getNextTileIndex());
+    this.newRow_ = new Mosaic.Row(this.getNextTileIndex());
 
   this.tiles_.push(tile);
   this.newRow_.add(tile);
@@ -1770,8 +1770,9 @@ Mosaic.Tile.prototype.init = function() {
         metadata,
         undefined,  // Media type.
         ThumbnailLoader.UseEmbedded.USE_EMBEDDED,
-        2);  // Preloaders have always higher priotity, so the preload images
-             // are loaded as soon as possible.
+        // Preloaders have always higher priotity, so the preload images
+        // are loaded as soon as possible.
+        2);
   }
 
   // Dimensions are always acquired from the metadata. For local files, it is
@@ -1783,10 +1784,10 @@ Mosaic.Tile.prototype.init = function() {
   if (metadata.media && metadata.media.width) {
     width = metadata.media.width;
     height = metadata.media.height;
-  } else if (metadata.drive && metadata.drive.imageWidth &&
-             metadata.drive.imageHeight) {
-    width = metadata.drive.imageWidth;
-    height = metadata.drive.imageHeight;
+  } else if (metadata.external && metadata.external.imageWidth &&
+             metadata.external.imageHeight) {
+    width = metadata.external.imageWidth;
+    height = metadata.external.imageHeight;
   } else {
     // No dimensions in metadata, then use the generic dimensions.
     width = Mosaic.Tile.GENERIC_ICON_SIZE;