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

Side by Side Diff: ui/file_manager/gallery/js/image_editor/image_editor.js

Issue 398263002: Gallery: Random fixes for the Viewport class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * ImageEditor is the top level object that holds together and connects 8 * ImageEditor is the top level object that holds together and connects
9 * everything needed for image editing. 9 * everything needed for image editing.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 onToolsVisibilityChanged) { 23 onToolsVisibilityChanged) {
24 this.rootContainer_ = DOMContainers.root; 24 this.rootContainer_ = DOMContainers.root;
25 this.container_ = DOMContainers.image; 25 this.container_ = DOMContainers.image;
26 this.modes_ = modes; 26 this.modes_ = modes;
27 this.displayStringFunction_ = displayStringFunction; 27 this.displayStringFunction_ = displayStringFunction;
28 this.onToolsVisibilityChanged_ = onToolsVisibilityChanged; 28 this.onToolsVisibilityChanged_ = onToolsVisibilityChanged;
29 29
30 ImageUtil.removeChildren(this.container_); 30 ImageUtil.removeChildren(this.container_);
31 31
32 this.viewport_ = viewport; 32 this.viewport_ = viewport;
33 this.viewport_.sizeByFrame(this.container_); 33 this.viewport_.setScreenSize(
34 this.container_.clientWidth, this.container_.clientHeight);
34 35
35 this.imageView_ = imageView; 36 this.imageView_ = imageView;
36 this.imageView_.addContentCallback(this.onContentUpdate_.bind(this)); 37 this.imageView_.addContentCallback(this.onContentUpdate_.bind(this));
37 38
38 this.buffer_ = new ImageBuffer(); 39 this.buffer_ = new ImageBuffer();
39 this.buffer_.addOverlay(this.imageView_); 40 this.buffer_.addOverlay(this.imageView_);
40 41
41 this.panControl_ = new ImageEditor.MouseControl( 42 this.panControl_ = new ImageEditor.MouseControl(
42 this.rootContainer_, this.container_, this.getBuffer()); 43 this.rootContainer_, this.container_, this.getBuffer());
43 this.panControl_.setDoubleTapCallback(this.onDoubleTap_.bind(this)); 44 this.panControl_.setDoubleTapCallback(this.onDoubleTap_.bind(this));
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1194
1194 /** 1195 /**
1195 * Hide the prompt. 1196 * Hide the prompt.
1196 */ 1197 */
1197 ImageEditor.Prompt.prototype.hide = function() { 1198 ImageEditor.Prompt.prototype.hide = function() {
1198 if (!this.prompt_) return; 1199 if (!this.prompt_) return;
1199 this.prompt_.setAttribute('state', 'fadeout'); 1200 this.prompt_.setAttribute('state', 'fadeout');
1200 // Allow some time for the animation to play out. 1201 // Allow some time for the animation to play out.
1201 this.setTimer(this.reset.bind(this), 500); 1202 this.setTimer(this.reset.bind(this), 500);
1202 }; 1203 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/commands.js ('k') | ui/file_manager/gallery/js/image_editor/image_transform.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698