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

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/image_transform.js

Issue 12212127: [cleanup] Files.app: Remove Function declarations within blocks #3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: chrome/browser/resources/file_manager/js/image_editor/image_transform.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_transform.js b/chrome/browser/resources/file_manager/js/image_editor/image_transform.js
index bc3db351bee69d85ffb41680d3cbdf36f4388aba..339d7523fd6981f4030e5d3c20aa350e1f64ea9f 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_transform.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_transform.js
@@ -295,7 +295,7 @@ DraggableRect.prototype.getDragHandler = function(x, y, touch) {
self.bounds_.bottom = self.bounds_.top + fixedHeight;
};
} else {
- function checkNewCrop() {
+ var checkNewCrop = function() {
if (self.dragMode_.newcrop) {
self.dragMode_.newcrop = false;
self.bounds_.left = self.bounds_.right = x;
@@ -303,15 +303,15 @@ DraggableRect.prototype.getDragHandler = function(x, y, touch) {
mouseBiasX = 0;
mouseBiasY = 0;
}
- }
+ };
- function flipSide(side) {
+ var flipSide = function(side) {
var opposite = self.oppositeSide_[side];
var temp = self.bounds_[side];
self.bounds_[side] = self.bounds_[opposite];
self.bounds_[opposite] = temp;
return opposite;
- }
+ };
if (this.dragMode_.xSide != DraggableRect.NONE) {
mouseBiasX = self.bounds_[this.dragMode_.xSide] - x;
@@ -321,7 +321,7 @@ DraggableRect.prototype.getDragHandler = function(x, y, touch) {
if (self.bounds_.left > self.bounds_.right) {
self.dragMode_.xSide = flipSide(self.dragMode_.xSide);
}
- }
+ };
}
if (this.dragMode_.ySide != DraggableRect.NONE) {
mouseBiasY = self.bounds_[this.dragMode_.ySide] - y;
@@ -331,7 +331,7 @@ DraggableRect.prototype.getDragHandler = function(x, y, touch) {
if (self.bounds_.top > self.bounds_.bottom) {
self.dragMode_.ySide = flipSide(self.dragMode_.ySide);
}
- }
+ };
}
}

Powered by Google App Engine
This is Rietveld 408576698