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

Unified Diff: ui/file_manager/gallery/js/image_editor/commands.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, 3 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 | « no previous file | ui/file_manager/gallery/js/image_editor/image_editor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/image_editor/commands.js
diff --git a/ui/file_manager/gallery/js/image_editor/commands.js b/ui/file_manager/gallery/js/image_editor/commands.js
index 17aac5abb6382b300fa07febcbf13e669e5351f7..30b3d3aca9269bf166da8618c6e8df4833e8046b 100644
--- a/ui/file_manager/gallery/js/image_editor/commands.js
+++ b/ui/file_manager/gallery/js/image_editor/commands.js
@@ -364,7 +364,7 @@ Command.Rotate.prototype.revertView = function(canvas, imageView) {
/**
* Crop command.
*
- * @param {Rect} imageRect Crop rectangle in image coordinates.
+ * @param {ImageRect} imageRect Crop rectangle in image coordinates.
* @constructor
* @extends {Command}
*/
@@ -380,7 +380,8 @@ Command.Crop.prototype.execute = function(
document, srcCanvas, callback, uiContext) {
var result = this.createCanvas_(
document, srcCanvas, this.imageRect_.width, this.imageRect_.height);
- Rect.drawImage(result.getContext('2d'), srcCanvas, null, this.imageRect_);
+ ImageRect.drawImage(
+ result.getContext('2d'), srcCanvas, null, this.imageRect_);
var delay;
if (uiContext.imageView) {
delay = uiContext.imageView.replaceAndAnimate(result, this.imageRect_, 0);
@@ -427,11 +428,11 @@ Command.Filter.prototype.execute = function(
} else {
var viewport = uiContext.imageView.viewport_;
- var imageStrip = new Rect(viewport.getImageBounds());
+ var imageStrip = new ImageRect(viewport.getImageBounds());
imageStrip.top = previousRow;
imageStrip.height = updatedRow - previousRow;
- var screenStrip = new Rect(viewport.getImageBoundsOnScreen());
+ var screenStrip = new ImageRect(viewport.getImageBoundsOnScreen());
screenStrip.top = Math.round(viewport.imageToScreenY(previousRow));
screenStrip.height =
Math.round(viewport.imageToScreenY(updatedRow)) - screenStrip.top;
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/image_editor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698