-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added plot loading spinner. closes #22
- Loading branch information
1 parent
6174802
commit c37fc42
Showing
5 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Shiny.addCustomMessageHandler("plot_loading", | ||
value => { | ||
document.getElementById("debarcoderui_plot_data_spinner").style.visibility = "visible" | ||
document.getElementById("debarcoderui_plot_data_text").style.visibility = "hidden" | ||
} | ||
) | ||
|
||
$(document).on('shiny:value', event => { | ||
|
||
if(event.target.id == "debarcoderui_plot1" || event.target.id == "debarcoderui_plot2") { | ||
|
||
document.getElementById("debarcoderui_plot_data_spinner").style.visibility = "hidden" | ||
document.getElementById("debarcoderui_plot_data_text").style.visibility = "visible" | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
@keyframes spinner { | ||
to {transform: rotate(360deg);} | ||
} | ||
|
||
.spinner:before { | ||
content: ''; | ||
box-sizing: border-box; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 20px; | ||
height: 20px; | ||
margin-top: -10px; | ||
margin-left: -10px; | ||
border-radius: 50%; | ||
border-top: 2px solid #07d; | ||
border-right: 2px solid transparent; | ||
animation: spinner .6s linear infinite; | ||
} |