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

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

Issue 1784143003: Gallery: Update edit-mode-applicavilities even if it's a instant auto fix, and update them on undo/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | ui/file_manager/gallery/js/slide_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/image_editor.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_editor.js b/ui/file_manager/gallery/js/image_editor/image_editor.js
index 9040fe6926ceb02bf292f2fce0999e9bcdcff47e..78860293941f940c984654a9a9b8a4923f706863 100644
--- a/ui/file_manager/gallery/js/image_editor/image_editor.js
+++ b/ui/file_manager/gallery/js/image_editor/image_editor.js
@@ -301,6 +301,7 @@ ImageEditor.prototype.undo = function() {
this.leaveModeInternal_(false, false /* not to switch mode */);
this.commandQueue_.undo();
this.updateUndoRedo();
+ this.calculateModeApplicativity_();
};
/**
@@ -313,6 +314,7 @@ ImageEditor.prototype.redo = function() {
this.leaveModeInternal_(false, false /* not to switch mode */);
this.commandQueue_.redo();
this.updateUndoRedo();
+ this.calculateModeApplicativity_();
};
/**
@@ -635,6 +637,7 @@ ImageEditor.prototype.setUpMode_ = function(mode) {
this.currentMode_.setUp();
+ this.calculateModeApplicativity_();
if (this.currentMode_.instant) { // Instant tool.
this.leaveModeInternal_(true, false /* not to switch mode */);
return;
@@ -645,7 +648,6 @@ ImageEditor.prototype.setUpMode_ = function(mode) {
this.modeToolbar_.clear();
this.currentMode_.createTools(this.modeToolbar_);
this.modeToolbar_.show(true);
- this.calculateModeApplicativity_();
};
/**
@@ -810,6 +812,13 @@ ImageEditor.prototype.onDoubleTap_ = function(x, y) {
};
/**
+ * Called when the user starts editing image.
+ */
+ImageEditor.prototype.onStartEditing = function() {
+ this.calculateModeApplicativity_();
+};
+
+/**
* A helper object for panning the ImageBuffer.
*
* @param {!HTMLElement} rootContainer The top-level container.
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698