| 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.
|
|
|