Skip to content

Commit 7003506

Browse files
committed
included load_all() and Main tab is now cleared after 'Clear Model'
1 parent 72dee95 commit 7003506

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

google-analytics.html

-9
This file was deleted.

inst/modelbuilder/app.R

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@ examplemodeldir = system.file("modelexamples", package = packagename) #find path
2424

2525
allexamplemodels = c("none",list.files(examplemodeldir))
2626

27-
## Update namespace if functions were added to R folder
28-
devtools::document()
29-
3027
#*** Attach necessary packages (remove after dev)
28+
library(devtools)
3129
library(DiagrammeR)
3230
library(ggplot2)
3331
library(plotly)
3432
library(shiny)
3533
library(shinyjs)
3634
library(shinydashboard)
3735

36+
## Update namespace if functions were added to R folder
37+
devtools::document()
38+
devtools::load_all()
39+
3840
#this function is the server part of the app
3941
server <- function(input, output, session) {
4042

@@ -685,6 +687,9 @@ server <- function(input, output, session) {
685687
shinyjs::disable(id = "exportdiscrete")
686688
updateSelectInput(session, "examplemodel", selected = 'none')
687689
mbmodel <<- NULL
690+
691+
# set buildUiTrigger to 0 so that the build tab is wiped after clearing a model
692+
values$buildUiTrigger <- 0
688693
})
689694

690695
#######################################################
@@ -791,7 +796,7 @@ server <- function(input, output, session) {
791796

792797
#This is the UI for the Main Menu of modelbuilder
793798
ui <- fluidPage(
794-
shinyjs::useShinyjs(), # Set up shinyjs
799+
shinyjs::useShinyjs(), # Set up shinyjsd
795800
tags$head(includeHTML(("google-analytics.html"))), #this is only needed for Google analytics when deployed as app to the UGA server. Should not affect R package use.
796801
includeCSS("packagestyle.css"),
797802

0 commit comments

Comments
 (0)