Skip to content

Commit

Permalink
added default values to the slider and added a disappear animation
Browse files Browse the repository at this point in the history
  • Loading branch information
kvn8888 committed Jan 28, 2024
1 parent ddb844e commit 3787721
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions experimental/spinner.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@
}
}

@keyframes disappear {
0% {
opacity: 1;
}
80% {
opacity: 1;
}
100% {
opacity: 0;
}
}

@keyframes draw {
to {
stroke-dashoffset: 0;
Expand Down
7 changes: 4 additions & 3 deletions experimental/spinner.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
completionButton.addEventListener('click', function() {
var staticCircle = document.querySelector('.static circle');
staticCircle.style.strokeDasharray = "50, 0"
staticCircle.style.animation = "uponCompletion 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1";
staticCircle.style.animation = "uponCompletion 1.5s cubic-bezier(0.16, 1, 0.3, 1) 1, disappear 1.5s cubic-bezier(0,.68,.29,1) 1";
staticCircle.style.opacity = "0";
})

};
Expand All @@ -83,10 +84,10 @@
</svg>
</div>
<label for="dashlengthSlider">Dash Length:</label>
<input type="range" id="dashlength" value="1" max="250">
<input type="range" id="dashlength" value="50" max="250">
<p id="dashlengthValue">Current dashlength value: </p>
<label for="gaplengthSlider">GapLength:</label>
<input type="range" id="gaplength" value="1" max="250">
<input type="range" id="gaplength" value="250" max="250">
<p id="gaplengthValue">Current gaplength value: </p>

<button id="Complete">Complete</button>
Expand Down

0 comments on commit 3787721

Please sign in to comment.