Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
|
@@ -1153,7 +1153,24 @@ server <- function(input, output, session) {
|
|
| 1153 |
updateSelectInput(session, "modal_new_pitch_type",
|
| 1154 |
selected = clicked_pitch$TaggedPitchType)
|
| 1155 |
|
| 1156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1157 |
}
|
| 1158 |
})
|
| 1159 |
|
|
@@ -1393,7 +1410,7 @@ server <- function(input, output, session) {
|
|
| 1393 |
plot_data(current_data)
|
| 1394 |
processed_data(current_data)
|
| 1395 |
|
| 1396 |
-
|
| 1397 |
|
| 1398 |
showNotification(
|
| 1399 |
paste("Updated pitch from", pitch_info$original_type, "to", input$modal_new_pitch_type),
|
|
@@ -1406,7 +1423,7 @@ server <- function(input, output, session) {
|
|
| 1406 |
|
| 1407 |
# Cancel edit
|
| 1408 |
observeEvent(input$cancel_edit, {
|
| 1409 |
-
|
| 1410 |
selected_pitch(NULL)
|
| 1411 |
})
|
| 1412 |
|
|
|
|
| 1153 |
updateSelectInput(session, "modal_new_pitch_type",
|
| 1154 |
selected = clicked_pitch$TaggedPitchType)
|
| 1155 |
|
| 1156 |
+
showModal(modalDialog(
|
| 1157 |
+
title = "Edit Pitch Type",
|
| 1158 |
+
div(style = "padding: 20px;",
|
| 1159 |
+
h4("Selected Pitch Details:", style = "color: darkcyan;"),
|
| 1160 |
+
verbatimTextOutput("selected_pitch_info"),
|
| 1161 |
+
br(),
|
| 1162 |
+
selectInput("modal_new_pitch_type", "Change Pitch Type To:",
|
| 1163 |
+
choices = c("Fastball", "Sinker", "Cutter", "Slider",
|
| 1164 |
+
"Curveball", "ChangeUp", "Splitter", "Knuckleball", "Other"),
|
| 1165 |
+
selected = clicked_pitch$TaggedPitchType),
|
| 1166 |
+
br(),
|
| 1167 |
+
actionButton("update_pitch", "Update Pitch Type", class = "btn-primary btn-lg"),
|
| 1168 |
+
actionButton("cancel_edit", "Cancel", class = "btn-default")
|
| 1169 |
+
),
|
| 1170 |
+
footer = NULL,
|
| 1171 |
+
size = "m",
|
| 1172 |
+
easyClose = TRUE
|
| 1173 |
+
))
|
| 1174 |
}
|
| 1175 |
})
|
| 1176 |
|
|
|
|
| 1410 |
plot_data(current_data)
|
| 1411 |
processed_data(current_data)
|
| 1412 |
|
| 1413 |
+
removeModal()
|
| 1414 |
|
| 1415 |
showNotification(
|
| 1416 |
paste("Updated pitch from", pitch_info$original_type, "to", input$modal_new_pitch_type),
|
|
|
|
| 1423 |
|
| 1424 |
# Cancel edit
|
| 1425 |
observeEvent(input$cancel_edit, {
|
| 1426 |
+
removeModal()
|
| 1427 |
selected_pitch(NULL)
|
| 1428 |
})
|
| 1429 |
|