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..b14454eec7db30252d26f1d173d60dd0c85135bd 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,28 @@ function Rect() { |
Array.apply(null, arguments)); |
} |
+Rect.prototype = { |
+ /** |
+ * Obtains the x coordinate of right edge. The most right pixels in the |
+ * rectangle are (x = right - 1) and the pixels (x = right) are not included |
+ * in the rectangle. |
+ * @return {number} |
+ */ |
+ get right() { |
+ return this.left + this.width; |
+ }, |
+ |
+ /** |
+ * Obtains the y coordinate of bottom edge. The most bottom pixels in the |
+ * rectanlge are (y = buttom - 1) and the pixels (y = bottom) are not included |
+ * in the rectangle. |
+ * @return {number} |
+ */ |
+ get bottom() { |
+ return this.top + this.height; |
+ } |
+}; |
+ |
/** |
* @param {number} factor Factor to scale. |
* @return {Rect} A rectangle with every dimension scaled. |