Chromium Code Reviews| Index: ui/file_manager/gallery/js/image_editor/image_util.js |
| diff --git a/ui/file_manager/gallery/js/image_editor/image_util.js b/ui/file_manager/gallery/js/image_editor/image_util.js |
| index 7a7a2bfb85a36563af2c992124dc25a5a4ffff8c..2b1e2d6c3dd95daa611001a961b1f9bd071590ed 100644 |
| --- a/ui/file_manager/gallery/js/image_editor/image_util.js |
| +++ b/ui/file_manager/gallery/js/image_editor/image_util.js |
| @@ -139,6 +139,24 @@ function Rect() { |
| Array.apply(null, arguments)); |
| } |
| +Rect.prototype = { |
| + /** |
| + * Obtains the x coordinate number of right edge. |
|
mtomasz
2014/07/17 06:08:56
nit: Please add a comment, that the edge is one pi
hirono
2014/07/17 06:26:54
Done.
|
| + * @return {number} |
| + */ |
| + get right() { |
| + return this.left + this.width; |
|
mtomasz
2014/07/17 05:43:20
I think it should be:
this.left + this.width - 1.
hirono
2014/07/17 05:56:47
Exactly. but the right edge of the pixel is a line
mtomasz
2014/07/17 06:08:56
This is quite confusing. The left edge is within t
hirono
2014/07/17 06:26:54
Maybe this is common when implementing rectangle c
|
| + }, |
| + |
| + /** |
| + * Obtains the y coordinate number of bottom edge. |
|
mtomasz
2014/07/17 06:08:56
nit: coordinate number -> coordinate
hirono
2014/07/17 06:26:54
Done.
|
| + * @return {number} |
| + */ |
| + get bottom() { |
| + return this.top + this.height; |
| + } |
| +}; |
| + |
| /** |
| * @param {number} factor Factor to scale. |
| * @return {Rect} A rectangle with every dimension scaled. |