Chromium Code Reviews| Index: chrome/browser/resources/file_manager/js/image_editor/image_editor.js |
| =================================================================== |
| --- chrome/browser/resources/file_manager/js/image_editor/image_editor.js (revision 98602) |
| +++ chrome/browser/resources/file_manager/js/image_editor/image_editor.js (working copy) |
| @@ -8,8 +8,9 @@ |
| * @param {HTMLElement} container |
| * @param {function(Blob)} saveCallback |
| * @param {function()} closeCallback |
| + * @param {HTMLElement} toolbarContainer |
| */ |
| -function ImageEditor(container, saveCallback, closeCallback) { |
| +function ImageEditor(container, saveCallback, closeCallback, toolbarContainer) { |
| this.container_ = container; |
| this.saveCallback_ = saveCallback; |
| this.closeCallback_ = closeCallback; |
| @@ -29,13 +30,14 @@ |
| this.buffer_ = new ImageBuffer(canvas); |
| - this.scaleControl_ = new ImageEditor.ScaleControl( |
| - this.canvasWrapper_, this.getBuffer().getViewport()); |
| +// We don't need this for now. |
|
zel
2011/09/02 17:11:58
then remove it if it's not needed
dgozman
2011/09/06 14:18:47
Done.
|
| +// this.scaleControl_ = new ImageEditor.ScaleControl( |
| +// this.canvasWrapper_, this.getBuffer().getViewport()); |
| this.panControl_ = new ImageEditor.MouseControl(canvas, this.getBuffer()); |
| - this.toolbar_ = |
| - new ImageEditor.Toolbar(container, this.onOptionsChange.bind(this)); |
| + this.toolbar_ = new ImageEditor.Toolbar(toolbarContainer, |
| + this.onOptionsChange.bind(this)); |
| this.initToolbar(); |
| } |
| @@ -112,7 +114,7 @@ |
| this.createModeButtons(); |
| this.toolbar_.addButton('Save', this.save.bind(this, true)); |
| - this.toolbar_.addButton('Close', this.close.bind(this, false)); |
| +// this.toolbar_.addButton('Close', this.close.bind(this, false)); |
|
zel
2011/09/02 17:11:58
if this button is removed, please remove this line
dgozman
2011/09/06 14:18:47
Done.
|
| }; |
| /** |