Chromium Code Reviews| 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..636b3d9857afc6fb063c6578c093d3139fe11786 100644 |
| --- a/ui/file_manager/gallery/js/image_editor/image_editor.js |
| +++ b/ui/file_manager/gallery/js/image_editor/image_editor.js |
| @@ -323,6 +323,7 @@ ImageEditor.prototype.updateUndoRedo = function() { |
| var canRedo = this.commandQueue_ && this.commandQueue_.canRedo(); |
| ImageUtil.setAttribute(this.undoButton_, 'disabled', !canUndo); |
| ImageUtil.setAttribute(this.redoButton_, 'disabled', !canRedo); |
| + this.calculateModeApplicativity_(); |
| }; |
| /** |
| @@ -635,6 +636,7 @@ ImageEditor.prototype.setUpMode_ = function(mode) { |
| this.currentMode_.setUp(); |
| + this.calculateModeApplicativity_(); |
|
yawano
2016/03/07 11:16:18
setUpMode_ is called when user has clicked each mo
ryoh
2016/03/07 11:55:09
That's right!
I introduce new callback, ImageEdito
|
| if (this.currentMode_.instant) { // Instant tool. |
| this.leaveModeInternal_(true, false /* not to switch mode */); |
| return; |
| @@ -645,7 +647,6 @@ ImageEditor.prototype.setUpMode_ = function(mode) { |
| this.modeToolbar_.clear(); |
| this.currentMode_.createTools(this.modeToolbar_); |
| this.modeToolbar_.show(true); |
| - this.calculateModeApplicativity_(); |
| }; |
| /** |