@@ -9,118 +9,146 @@ themes <- list("Bw" = theme_bw(),
9
9
# ###############
10
10
# ## SETTINGS ###
11
11
# ###############
12
- settingsOutput = function (){
13
- return (
14
- fluidRow (
15
- column( 7 ,
16
- fluidRow(
17
- box( title = " Project " ,
18
- status = " warning " , solidHeader = F , # height = 300 ,
19
- collapsible = T , width = 12 ,
20
-
21
- p( " Please select a project or create a new folder: " ),
22
-
23
- shinyDirButton( ' folder ' ,
24
- ' Folder select ' ,
25
- ' Please select a folder ' ,
26
- # multiple = FALSE ,
27
- style = buttonStyles( " red " ),
28
- icon = icon( " folder-open " )),
29
- actButton( " crtPrj " , " Create/set project " , " create " ),
30
- br(), br(),
31
- h4( " Current project " ) ,
32
- verbatimTextOutput( " prjName " ) ,
33
- h4( " Current project directory " ) ,
34
- verbatimTextOutput( " prjDir " )
35
- ) ,
36
- box( title = " Measuring environment " ,
37
- status = " warning " ,
38
- collapsible = T , width = 12 ,
39
- h4( " Wood properties " ),
40
- fluidRow (
41
- column( 4 , numericInput( " stemCircumference " ,
42
- " Stem circumference (cm) " ,
43
- value = 0.0 )) ,
44
- column( 4 , numericInput( " stemDiameter " ,
45
- " Stem diameter (cm) " ,
46
- value = 0.0 )) ,
47
- column( 4 , numericInput( " barkThickness " ,
48
- " Bark thickness (cm) " ,
49
- value = 0.0 ))
50
- ),
12
+ settingsOutput = function () {
13
+ return ( list (fluidRow (
14
+ box (
15
+ title = " Measuring environment " ,
16
+ status = " warning " ,
17
+ collapsible = T ,
18
+ width = 7 ,
19
+ box.settings_measuring()
20
+ ),
21
+ box(
22
+ title = " Project " ,
23
+ status = " info " ,
24
+ solidHeader = F ,
25
+ collapsible = T ,
26
+ width = 5 ,
27
+ box.settings_project()
28
+
29
+ ),
30
+ box(
31
+ title = " File output (optional) " ,
32
+ status = " info " ,
33
+ solidHeader = F ,
34
+ collapsible = T ,
35
+ collapsed = T ,
36
+ width = 5 ,
37
+ box.setting_files()
38
+ ) ,
39
+
40
+ box (
41
+ title = " Visualization (optional) " ,
42
+ status = " info " ,
43
+ solidHeader = F ,
44
+ collapsible = T ,
45
+ collapsed = T ,
46
+ width = 5 ,
47
+ box.setting_visualization()
48
+ )
49
+ ) ))
50
+ }
51
51
52
- fluidRow(
53
- column(4 , numericInput(" sapWoodDepth" ,
54
- " Sap wood depth (cm)" ,
55
- value = 0.0 )),
56
- column(4 , numericInput(" heartWoodDepth" ,
57
- " Heart wood depth (cm)" ,
58
- value = 0.0 ))
59
- ),
60
-
61
-
62
- fluidRow(
63
- column(4 , checkboxInput(" swExact" , " Use exact sap-/ heartwood values*" ,
64
- F )),
65
- column(6 , p(" * If enabled wood attributes, i.e. R, Aring, Cring, are calculated using
66
- the sum of sapwood and heartwood depth" ))
67
- ),
68
-
69
-
70
-
71
- numericInput(" ThermalDiffusivity" ,
72
- HTML(" Thermal diffusivity (cm<sup>2</sup> s <sup>-1</sup>)" ),
73
- value = 0.0025 ),
74
-
52
+ box.settings_project = function (){
53
+ return (list (
54
+ p(" 1. Select or create a new folder to store files generated with this app." ),
55
+ shinyDirButton(' folder' ,
56
+ ' Folder select' ,
57
+ ' Please select a folder' ,
58
+ # multiple = FALSE,
59
+ style = buttonStyles(" red" ),
60
+ icon = icon(" folder-open" , style = " margin-right:.5em" )),
61
+
62
+ p(" 2. Create your project directory." ),
63
+ actButton(" crtPrj" , " Create/set project" , " create" ),
64
+ # br(), br(),
65
+ h4(" Current project" ),
66
+ verbatimTextOutput(" prjName" ),
67
+ h4(" Current project directory" ),
68
+ verbatimTextOutput(" prjDir" )
69
+ ))
70
+ }
75
71
76
- box.settings_sensor()
77
- )
78
- )),
79
- column(5 ,
80
- fluidRow(
81
- box(title = " File output" ,
82
- status = " warning" , solidHeader = F ,
83
- collapsible = T , width = 12 ,
84
- p(em(" (Optional inputs)" )),
85
- selectInput(" figFor" , " Figure format" ,
86
- c(" jpg" = " jpg" ,
87
- " rdata" = " rdata" ,
88
- " pdf" = " pdf" )),
89
-
90
- textInput(" figTitle" , " Figure title" ,
91
- placeholder = " e.g. tree species" ),
92
- radioButtons(" fileAppend" , " String added to file names" ,
93
- choices = c(" Input file name" = " inputName" ,
94
- " Manual" = " manual" ,
95
- " None" = " none" )),
96
- conditionalPanel(condition = " input.fileAppend == `manual`" ,
97
- textInput(" fileAppendName" , " File name" ,
98
- placeholder = " e.g. summer_22" ))),
99
-
100
- box(title = " Visualization" ,
101
- status = " warning" , solidHeader = F ,
102
- collapsible = T , width = 12 ,
103
- selectInput(" figTheme" , " Figure theme (ggplot)" ,
104
- choices = names(themes ),
105
- selected = themes [" Light" ]),
106
- uiOutput(' theme_output' ),
107
- textInput(" fillColors" , " Fill colors for discrete data*" ,
108
- placeholder = ' Hex colors, comma delimited: #CD5C5C, #FFBF00, #6495ED' ),
109
- textInput(" gradientColors" , " Colors for gradient color scale**" ,
110
- placeholder = ' Hex colors, comma delimited: #CD5C5C, #FFBF00' ),
111
- p(" * Colors can be either hex colors or a RColorBrewer palette,
112
- e.g. 'Blues'" ),
113
- p(" ** Two colors representing low and high values." ),
114
-
115
- )))
116
- )
117
- )
72
+ box.setting_files = function (){
73
+ return (list (
74
+ selectInput(" figFor" , " Figure format" ,
75
+ c(" jpg" = " jpg" ,
76
+ " rdata" = " rdata" ,
77
+ " pdf" = " pdf" )),
78
+
79
+ textInput(" figTitle" , " Figure title" ,
80
+ placeholder = " e.g. tree species" ),
81
+ radioButtons(" fileAppend" , " String added to file names" ,
82
+ choices = c(" Input file name" = " inputName" ,
83
+ " Manual" = " manual" ,
84
+ " None" = " none" )),
85
+ conditionalPanel(condition = " input.fileAppend == `manual`" ,
86
+ textInput(" fileAppendName" , " File name" ,
87
+ placeholder = " e.g. summer_22" ))
88
+ ))
118
89
}
119
90
91
+ box.setting_visualization = function (){
92
+ return (list (
93
+ selectInput(" figTheme" , " Figure theme (ggplot)" ,
94
+ choices = names(themes ),
95
+ selected = themes [" Light" ]),
96
+ uiOutput(' theme_output' ),
97
+ textInput(" fillColors" , " Fill colors for discrete data*" ,
98
+ placeholder = ' Hex colors, comma delimited: #CD5C5C, #FFBF00, #6495ED' ),
99
+ textInput(" gradientColors" , " Colors for gradient color scale**" ,
100
+ placeholder = ' Hex colors, comma delimited: #CD5C5C, #FFBF00' ),
101
+ p(" * Colors can be either hex colors or a RColorBrewer palette,
102
+ e.g. 'Blues'" ),
103
+ p(" ** Two colors representing low and high values." )
104
+ ))
105
+ }
120
106
107
+ box.settings_measuring = function (){
108
+ return (list (
109
+ h3(strong(" Wood properties" )),
110
+ fluidRow(
111
+ column(4 , numericInput(" stemCircumference" ,
112
+ " Stem circumference (cm)" ,
113
+ value = 0.0 )),
114
+ column(4 , numericInput(" stemDiameter" ,
115
+ " Stem diameter (cm)" ,
116
+ value = 0.0 )),
117
+ column(4 , numericInput(" barkThickness" ,
118
+ " Bark thickness (cm)" ,
119
+ value = 0.0 ))
120
+ ),
121
+
122
+ fluidRow(
123
+ column(4 , numericInput(" sapWoodDepth" ,
124
+ " Sap wood depth (cm)" ,
125
+ value = 0.0 )),
126
+ column(4 , numericInput(" heartWoodDepth" ,
127
+ " Heart wood depth (cm)" ,
128
+ value = 0.0 ))
129
+ ),
130
+
131
+
132
+ fluidRow(
133
+ column(4 , checkboxInput(" swExact" , " Use exact sap-/ heartwood values*" ,
134
+ F )),
135
+ column(6 , p(" * If enabled wood attributes, i.e. R, Aring, Cring, are calculated using
136
+ the sum of sapwood and heartwood depth" ))
137
+ ),
138
+
139
+
140
+
141
+ numericInput(" ThermalDiffusivity" ,
142
+ HTML(" Thermal diffusivity (cm<sup>2</sup> s <sup>-1</sup>)" ),
143
+ value = 0.0025 ),
144
+
145
+
146
+ box.settings_sensor()
147
+ ))
148
+ }
121
149
box.settings_sensor = function (){
122
150
return (list (
123
- h4( " Sensor properties" ),
151
+ h3(strong( " Sensor properties" ) ),
124
152
fluidRow(
125
153
column(6 , numericInput(" dist2first" ,
126
154
" Distance to first thermometer (mm)" ,
0 commit comments