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

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

Issue 398283002: Gallery: Add the offset feature in the slide mode. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/viewport.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_view.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_view.js b/ui/file_manager/gallery/js/image_editor/image_view.js
index 312fe726e42d58fd0e187dc959cdf7049855edcb..3f49c953e314b3908ffda5508e82babb343da6f9 100644
--- a/ui/file_manager/gallery/js/image_editor/image_view.js
+++ b/ui/file_manager/gallery/js/image_editor/image_view.js
@@ -493,8 +493,6 @@ ImageView.prototype.replaceContent_ = function(
this.viewport_.setImageSize(
opt_width || this.contentCanvas_.width,
opt_height || this.contentCanvas_.height);
- this.viewport_.fitImage();
- this.viewport_.update();
this.draw();
this.container_.appendChild(this.screenImage_);
@@ -846,7 +844,7 @@ ImageView.Effect.prototype.transform = function(element, viewport) {
* @extends {ImageView.Effect}
*/
ImageView.Effect.None = function() {
- ImageView.Effect.call(this, 0);
+ ImageView.Effect.call(this, 0, 'easy-out');
};
/**
@@ -873,7 +871,7 @@ ImageView.Effect.None.prototype.transform = function(element, viewport) {
*/
ImageView.Effect.Slide = function Slide(direction, opt_slow) {
ImageView.Effect.call(this,
- opt_slow ? 800 : ImageView.Effect.DEFAULT_DURATION, 'ease-in-out');
+ opt_slow ? 800 : ImageView.Effect.DEFAULT_DURATION, 'ease-out');
this.direction_ = direction;
this.slow_ = opt_slow;
this.shift_ = opt_slow ? 100 : 40;
@@ -913,7 +911,7 @@ ImageView.Effect.Slide.prototype.transform = function(element, viewport) {
ImageView.Effect.Zoom = function(
previousImageWidth, previousImageHeight, imageCropRect, opt_duration) {
ImageView.Effect.call(this,
- opt_duration || ImageView.Effect.DEFAULT_DURATION);
+ opt_duration || ImageView.Effect.DEFAULT_DURATION, 'ease-out');
this.previousImageWidth_ = previousImageWidth;
this.previousImageHeight_ = previousImageHeight;
this.imageCropRect_ = imageCropRect;
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/viewport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698