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

Unified Diff: ui/file_manager/gallery/js/mosaic_mode.js

Issue 624563002: Files.app: Rename Rect used in Gallery with ImageRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/viewport.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/mosaic_mode.js
diff --git a/ui/file_manager/gallery/js/mosaic_mode.js b/ui/file_manager/gallery/js/mosaic_mode.js
index 6e14073ec4e0e7a2a232556faa9ec17da2f27d2c..077d5794cf998c83ded71dbf6999b74d0e8dc1dd 100644
--- a/ui/file_manager/gallery/js/mosaic_mode.js
+++ b/ui/file_manager/gallery/js/mosaic_mode.js
@@ -258,7 +258,7 @@ Mosaic.prototype.getSelectedTile = function() {
/**
* @param {number} index Tile index.
- * @return {Rect} Tile's image rectangle.
+ * @return {ImageRect} Tile's image rectangle.
*/
Mosaic.prototype.getTileRect = function(index) {
var tile = this.tiles_[index];
@@ -553,16 +553,15 @@ Mosaic.prototype.loadVisibleTiles_ = function() {
}.bind(this), 100);
// Tiles only in the viewport (visible).
- var visibleRect = new Rect(0,
- 0,
- this.clientWidth,
- this.clientHeight);
+ var visibleRect = new ImageRect(
+ 0, 0, this.clientWidth, this.clientHeight);
// Tiles in the viewport and also some distance on the left and right.
- var renderableRect = new Rect(-this.clientWidth,
- 0,
- 3 * this.clientWidth,
- this.clientHeight);
+ var renderableRect = new ImageRect(
+ -this.clientWidth,
+ 0,
+ 3 * this.clientWidth,
+ this.clientHeight);
// Unload tiles out of scope.
for (var index = 0; index < this.tiles_.length; index++) {
@@ -606,8 +605,9 @@ Mosaic.prototype.loadVisibleTiles_ = function() {
/**
* Applies reset the zoom transform.
*
- * @param {Rect} tileRect Tile rectangle. Reset the transform if null.
- * @param {Rect} imageRect Large image rectangle. Reset the transform if null.
+ * @param {ImageRect} tileRect Tile rectangle. Reset the transform if null.
+ * @param {ImageRect} imageRect Large image rectangle. Reset the transform if
+ * null.
* @param {boolean=} opt_instant True of the transition should be instant.
*/
Mosaic.prototype.transform = function(tileRect, imageRect, opt_instant) {
@@ -1968,7 +1968,7 @@ Mosaic.Tile.prototype.scrollIntoView = function(opt_animated) {
};
/**
- * @return {Rect} Rectangle occupied by the tile's image,
+ * @return {ImageRect} Rectangle occupied by the tile's image,
* relative to the viewport.
*/
Mosaic.Tile.prototype.getImageRect = function() {
@@ -1976,7 +1976,7 @@ Mosaic.Tile.prototype.getImageRect = function() {
return null;
var margin = Mosaic.Layout.SPACING / 2;
- return new Rect(this.left_ - this.container_.scrollLeft, this.top_,
+ return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_,
this.width_, this.height_).inflate(-margin, -margin);
};
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/viewport.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698