update loading

This commit is contained in:
Luke Pulverenti 2016-08-04 00:39:19 -04:00
parent f7f42a9777
commit 5516424502
22 changed files with 739 additions and 145 deletions

View file

@ -49,11 +49,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</demo-snippet>
<h3>paper-progress can be indeterminate</h3>
<h3>paper-progress can be indeterminate with a custom duration</h3>
<demo-snippet class="centered-demo">
<template>
<style is="custom-style">
paper-progress.slow {
--paper-progress-indeterminate-cycle-duration: 20s;
}
</style>
<paper-progress indeterminate></paper-progress>
<paper-progress indeterminate value="800" min="100" max="1000"></paper-progress>
<paper-progress indeterminate class="slow"></paper-progress>
</template>
</demo-snippet>
@ -84,7 +89,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</div>
<script>
var progress, button, animationFrame;
var progress, button;
var repeat, maxRepeat = 5, animating = false;
function nextProgress() {
@ -99,7 +104,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
progress.value = progress.min;
}
var animationFrame = requestAnimationFrame(nextProgress);
requestAnimationFrame(nextProgress);
}
function startProgress() {