Commit e0fb2a3b authored by Naoki Fukino's avatar Naoki Fukino Committed by Commit Bot

Files app: Preview PDF file in fit-to-page mode in quick view.

Instead of using the default zoom level, we can set fit-to-zoom mode by default
to resize the preview automatically when Files app window is resized.

Bug: 809314
Test: Manually tested
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6e8d2113c9bbbd65071de2191f4be37b62ef6fd0
Reviewed-on: https://chromium-review.googlesource.com/984912Reviewed-by: default avatarTatsuhisa Yamaguchi <yamaguchi@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548013}
parent e05f4529
...@@ -458,6 +458,8 @@ QuickViewController.prototype.getQuickViewParameters_ = function( ...@@ -458,6 +458,8 @@ QuickViewController.prototype.getQuickViewParameters_ = function(
}); });
params.browsable = browsable; params.browsable = browsable;
params.contentUrl = browsable ? URL.createObjectURL(file) : ''; params.contentUrl = browsable ? URL.createObjectURL(file) : '';
if (params.subtype == 'PDF')
params.contentUrl += '#view=Fit';
return params; return params;
}.bind(this)) }.bind(this))
.catch(function(e) { .catch(function(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment