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

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

Issue 16080002: Fixed cropping above the arrows in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated a comment. Created 7 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/image_editor.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_editor.js b/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
index a6db21125daa054182bc90a5fd8e165493c92701..1f42ed0779f41d85fe4d8d47a395605b5e1de1bd 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_editor.js
@@ -672,17 +672,16 @@ ImageEditor.MouseControl.MAX_DISTANCE_FOR_DOUBLE_TAP_ = 32;
ImageEditor.MouseControl.MAX_DOUBLE_TAP_DURATION_ = 1000;
/**
- * Convert the event position from the event object to client coordinates.
+ * Returns an event's position.
*
* @param {MouseEvent|Touch} e Pointer position.
- * @return {Object} A pair of x,y in client coordinates.
+ * @return {Object} A pair of x,y in page coordinates.
* @private
*/
ImageEditor.MouseControl.getPosition_ = function(e) {
- var clientRect = e.target.getBoundingClientRect();
return {
- x: e.clientX - clientRect.left,
- y: e.clientY - clientRect.top
+ x: e.pageX,
+ y: e.pageY
};
};
@@ -690,7 +689,7 @@ ImageEditor.MouseControl.getPosition_ = function(e) {
* Returns touch position or null if there is more than one touch position.
*
* @param {TouchEvent} e Event.
- * @return {object?} A pair of x,y in client coordinates.
+ * @return {object?} A pair of x,y in page coordinates.
* @private
*/
ImageEditor.MouseControl.prototype.getTouchPosition_ = function(e) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698