Commit 1143433f authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Enable swiping to switch between preview wallpapers

1) Add event listeners to enable using swipe to easily switch between
   different wallpapers, for preview in tablet mode.

2) In |getCollectionsInfo_|, use offline image info to render the UI
   for faster loading (useful when the connection is slow).

Bug: 837355
Change-Id: I127e0fae6444939deb44e45972e91a2741c08e91
Reviewed-on: https://chromium-review.googlesource.com/1102903Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570246}
parent e2f1a8ad
...@@ -383,7 +383,8 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] { ...@@ -383,7 +383,8 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] {
#dialog-header, #dialog-header,
#no-images-message, #no-images-message,
#current-wallpaper-info-bar, #current-wallpaper-info-bar,
#message-container { #message-container,
#preview-canvas {
display: none; display: none;
} }
...@@ -728,6 +729,13 @@ html[dir='rtl'] .v2 .top-header-contents .more-options { ...@@ -728,6 +729,13 @@ html[dir='rtl'] .v2 .top-header-contents .more-options {
display: flex; display: flex;
} }
.v2.preview-mode:not(.wallpaper-set-successfully) #preview-canvas {
-webkit-app-region: no-drag;
display: block;
height: 100%;
width: 100%;
}
.v2 #no-images-message { .v2 #no-images-message {
display: block; display: block;
position: absolute; position: absolute;
......
...@@ -188,6 +188,7 @@ found in the LICENSE file. ...@@ -188,6 +188,7 @@ found in the LICENSE file.
</div> </div>
</div> </div>
<div id="message-container"></div> <div id="message-container"></div>
<div id="preview-canvas"></div>
<div id="spinner" hidden></div> <div id="spinner" hidden></div>
<div id="daily-refresh-banner-template" hidden> <div id="daily-refresh-banner-template" hidden>
<div class="daily-refresh-banner"> <div class="daily-refresh-banner">
......
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