Embedding Projector: replace paper-progress with paper-spinner since it is GPU accelerated and doesn't block the UI thread.

Change: 139495322
This commit is contained in:
Dan Smilkov 2016-11-17 12:53:52 -08:00 committed by TensorFlower Gardener
parent f12b8253d6
commit 839ee165dc
2 changed files with 9 additions and 9 deletions

View File

@ -46,8 +46,9 @@ export function setModalMessage(msg: string, id: string = null,
let dialog = dom.querySelector('#notification-dialog') as any;
dialog.querySelector('.close-button').style.display =
showCloseButton ? null : 'none';
dialog.querySelector('.progress-bar').style.display =
showCloseButton ? 'none' : null;
let spinner = dialog.querySelector('.progress');
spinner.style.display = showCloseButton ? 'none' : null;
spinner.active = showCloseButton ? null : true;
dialog.querySelector('#notification-title').innerHTML = title;
let msgsContainer = dialog.querySelector('#notify-msgs') as HTMLElement;
let divId = `notify-msg-${id}`;
@ -84,4 +85,4 @@ export function setWarningMessage(msg: string): void {
toast.text = msg;
toast.duration = WARNING_DURATION_MS;
toast.open();
}
}

View File

@ -30,7 +30,7 @@ limitations under the License.
<link rel="import" href="../paper-dialog/paper-dialog.html">
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="../paper-progress/paper-progress.html">
<link rel="import" href="../paper-spinner/paper-spinner-lite.html">
<link rel="import" href="../paper-dialog-scrollable/paper-dialog-scrollable.html">
<link rel="import" href="vz-projector-bookmark-panel.html">
@ -139,10 +139,9 @@ limitations under the License.
text-transform: uppercase;
}
#notification-dialog paper-progress {
--paper-progress-indeterminate-cycle-duration: 1s;
--paper-progress-active-color: #880E4F;
width: 100%;
#notification-dialog .progress {
--paper-spinner-color: #880E4F;
--paper-spinner-stroke-width: 2px;
}
#notify-msgs {
@ -272,7 +271,7 @@ limitations under the License.
<paper-dialog-scrollable>
<div id="notify-msgs"></div>
</paper-dialog-scrollable>
<div><paper-progress class="progress-bar" indeterminate></paper-progress></div>
<div style="text-align: center;"><paper-spinner-lite active class="progress"></paper-spinner-lite></div>
<div class="buttons">
<paper-button class="close-button" dialog-confirm autofocus>Close</paper-button>
</div>