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

Unified Diff: ui/file_manager/gallery/js/image_editor/viewport.js

Issue 571453002: Correct indentation, JSDoc, etc... to comply with closure linter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/gallery/js/mosaic_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/image_editor/viewport.js
diff --git a/ui/file_manager/gallery/js/image_editor/viewport.js b/ui/file_manager/gallery/js/image_editor/viewport.js
index 52960c09b1b5727ae6e1117467da78f3a9c8c18d..0a9406fd13b43f02798270231d3349c1307abbf5 100644
--- a/ui/file_manager/gallery/js/image_editor/viewport.js
+++ b/ui/file_manager/gallery/js/image_editor/viewport.js
@@ -62,12 +62,14 @@ function Viewport() {
/**
* Offset specified by user operations.
* @type {number}
+ * @private
*/
this.offsetX_ = 0;
/**
* Offset specified by user operations.
* @type {number}
+ * @private
*/
this.offsetY_ = 0;
@@ -75,6 +77,7 @@ function Viewport() {
* Integer Rotation value.
* The rotation angle is this.rotation_ * 90.
* @type {number}
+ * @private
*/
this.rotation_ = 0;
@@ -195,6 +198,7 @@ Viewport.prototype.getRotation = function() {
* @param {number} height Height of the full resolution image.
* @return {number} The ratio of the full resotion image size and the calculated
* displayed image size.
+ * @private
*/
Viewport.prototype.getFittingScaleForImageSize_ = function(width, height) {
var scaleX = this.screenBounds_.width / width;
@@ -352,6 +356,11 @@ Viewport.prototype.imageToScreenRect = function(rect) {
};
/**
+ * @param {number} width Width of the rectangle.
+ * @param {number} height Height of the rectangle.
+ * @param {number} offsetX X-offset of center position of the rectangle.
+ * @param {number} offsetY Y-offset of center position of the rectangle.
+ * @return {Rect} Rectangle with given geometry.
* @private
*/
Viewport.prototype.getCenteredRect_ = function(
@@ -460,7 +469,7 @@ Viewport.prototype.getTransformation = function() {
}
return [
'translate(' + this.offsetX_ + 'px, ' + this.offsetY_ + 'px) ',
- 'rotate(' + (this.rotation_ * 90) + 'deg)',
+ 'rotate(' + (this.rotation_ * 90) + 'deg)',
'scale(' + (this.zoom_ * rotationScaleAdjustment) + ')'
].join(' ');
};
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/gallery/js/mosaic_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698