@@ -117,44 +117,6 @@ export default class GraphEditor extends React.Component {
117117 ) ;
118118 }
119119
120- const common2Graph = (
121- < >
122- { jxgBoard }
123-
124- < div className = "col-xl-6" >
125- < h3 > Scenario</ h3 >
126- < div className = "form-group" >
127- < label htmlFor = "gTitle" >
128- Title
129- </ label >
130- < input
131- id = "gTitle"
132- onChange = { handleFormUpdate . bind ( this ) }
133- value = { this . props . gTitle }
134- className = "form-control form-control-sm"
135- type = "text"
136- maxLength = "140"
137- />
138- </ div >
139-
140- < CommonGraphEditor
141- { ...this . props }
142- />
143-
144- { this . props . gId &&
145- < div className = "form-group mt-1" >
146- < a href = { `/course/${ courseId } /graph/` + this . props . gId + '/public/' }
147- title = "Student View"
148- className = "btn btn-secondary"
149- >
150- Student View
151- </ a >
152- </ div >
153- }
154- </ div >
155- </ >
156- ) ;
157-
158120 if ( this . props . gType === 0 || this . props . gType === 9 ) {
159121 // Demand-Supply, possibly AUC (area under curve)
160122 rightSide =
@@ -165,53 +127,21 @@ export default class GraphEditor extends React.Component {
165127 /> ;
166128 } else if ( this . props . gType === 13 ) {
167129 // Horizontal Joint Graph: two Linear Demand-Supply graphs
168- return (
169- < div className = "GraphEditor" >
170- { this . title ( ) }
171- < form >
172- < div className = "row" >
173- { common2Graph }
174- < div className = "col-xl-6" >
175- < DemandSupplyEditor
176- showAUC = { this . props . gType === 9 }
177- { ...commonEditorProps }
178- { ...this . props }
179- />
180- < CommonGraphSettings
181- { ...this . props }
182- />
183- </ div >
184- </ div >
185- < hr />
186- { editRow }
187- </ form >
188- </ div >
189- ) ;
130+ rightSide =
131+ < DemandSupplyEditor
132+ showAUC = { this . props . gType === 9 }
133+ { ...commonEditorProps }
134+ { ...this . props }
135+ /> ;
190136 } else if ( this . props . gType === 14 ) {
191137 // Horizontal Joint Graph: two Non-Linear Demand-Supply graphs
192- return (
193- < div className = "GraphEditor" >
194- { this . title ( ) }
195- < form >
196- < div className = "row" >
197- { common2Graph }
198- < div className = "col-xl-6" >
199- < NonLinearDemandSupplyEditor
200- hideFunctionChoice = { true }
201- showAUC = { this . props . gType === 10 }
202- { ...commonEditorProps }
203- { ...this . props }
204- />
205- < CommonGraphSettings
206- { ...this . props }
207- />
208- </ div >
209- </ div >
210- < hr />
211- { editRow }
212- </ form >
213- </ div >
214- ) ;
138+ rightSide =
139+ < NonLinearDemandSupplyEditor
140+ hideFunctionChoice = { true }
141+ showAUC = { this . props . gType === 10 }
142+ { ...commonEditorProps }
143+ { ...this . props }
144+ /> ;
215145 } else if ( this . props . gType === 1 || this . props . gType === 10 ) {
216146 // Non-Linear Demand Supply, possibly AUC (area under curve)
217147 rightSide =
@@ -308,28 +238,12 @@ export default class GraphEditor extends React.Component {
308238 { ...this . props }
309239 /> ;
310240 } else if ( this . props . gType === 24 ) {
311- return (
312- < div className = "GraphEditor" >
313- { this . title ( ) }
314- < form >
315- < div className = "row" >
316- { common2Graph }
317- < div className = "col-xl-6" >
318- < TaxRevenueEditor
319- showAUC = { this . props . gType === 9 }
320- { ...commonEditorProps }
321- { ...this . props }
322- />
323- < CommonGraphSettings
324- { ...this . props }
325- />
326- </ div >
327- </ div >
328- < hr />
329- { editRow }
330- </ form >
331- </ div >
332- ) ;
241+ rightSide =
242+ < TaxRevenueEditor
243+ showAUC = { this . props . gType === 9 }
244+ { ...commonEditorProps }
245+ { ...this . props }
246+ /> ;
333247 } else if ( this . props . gType === 25 ) {
334248 rightSide =
335249 < LinearDemandSupplySurplusEditor
0 commit comments