Skip to content

Commit f0f83a4

Browse files
committed
fixed bug
1 parent 7273706 commit f0f83a4

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

src/component/CRCP.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { districts, districtCode, counties, str2date, date2str } from "./ulti";
5757
import CssBaseline from "@material-ui/core/CssBaseline";
5858
import EditableTable from "./EditableTable";
5959

60-
const highway = ["IH 45", "US 290", "IH 30", "US 59", "IH 35W", "IH 820", "IH 10", "IH 40", "IH 35", "US 287", "US 81", "IH 27", "SL 289", "SH 226", "SH 36", "US 83B", "VA", "FM 3129", "IH 20", "US 71", "US 79", "US 47", "US 67", "BU90-Y", "CS", "FM 1960", "FM 364", "FM 365", "SH 347", "SH 105", "SH 12", "SH 124", "SH 146", "SH 326", "SH 61", "SH 73", "SH 87", "SS 380", "US 90", "US 69", "US 96", "BS6-R", "SH 21", "BW 8", "US 83", "BS 121H", "FM 1171", "FM 1382", "FM 2499", "FM 709", "FM 740", "IH 35E", "IH4 5", "IH 635", "LP 12", "LP 354", "MH", "SH 289", "SH 31", "SH 66", "SH 78", "SH 114", "SH 121", "SH 161", "SH 180", "SH 183", "SH 310", "SH 34", "SH 342", "SH 356", "SL 12", "SL 288", "SP 244", "SP 348", "SP 366", "SPUR 354", "US 175", "US 380", "US 75", "US 77", "US 377", "US 80", "US 54", "BU 287P", "FM 157", "IH 820 ", "SH 199", "SH 26", "SH 360", "FM 1764", "FM 523", "FM 1092", "FM 1488", "FM 518", "IH 610", "SH 288", "SH 332", "SH 225", "SH 242", "SH 249", "SH 35", "US 90A", "IH27", "SH 7", "FM 1472", "LP 20", "ODA 181-1", "ODA 181-2", "ODA 250-1", "ODA 250-2", "US 82", "SH 6", "FM 85", "LP 281", "LP 323", "SH 19", "SH 198", "SH 334", "US 259", "US 281", "FM 1695", "FM 3476", "FM 933", "IH 36", "LP 363", "SH 195", "US 84", "BU 287J", "IH 44", "SH 240", "SP 1027 ", "US 287 ", "US 55", "US 70", "SH 71"];
60+
// const highway = ["IH 45", "US 290", "IH 30", "US 59", "IH 35W", "IH 820", "IH 10", "IH 40", "IH 35", "US 287", "US 81", "IH 27", "SL 289", "SH 226", "SH 36", "US 83B", "VA", "FM 3129", "IH 20", "US 71", "US 79", "US 47", "US 67", "BU90-Y", "CS", "FM 1960", "FM 364", "FM 365", "SH 347", "SH 105", "SH 12", "SH 124", "SH 146", "SH 326", "SH 61", "SH 73", "SH 87", "SS 380", "US 90", "US 69", "US 96", "BS6-R", "SH 21", "BW 8", "US 83", "BS 121H", "FM 1171", "FM 1382", "FM 2499", "FM 709", "FM 740", "IH 35E", "IH4 5", "IH 635", "LP 12", "LP 354", "MH", "SH 289", "SH 31", "SH 66", "SH 78", "SH 114", "SH 121", "SH 161", "SH 180", "SH 183", "SH 310", "SH 34", "SH 342", "SH 356", "SL 12", "SL 288", "SP 244", "SP 348", "SP 366", "SPUR 354", "US 175", "US 380", "US 75", "US 77", "US 377", "US 80", "US 54", "BU 287P", "FM 157", "IH 820 ", "SH 199", "SH 26", "SH 360", "FM 1764", "FM 523", "FM 1092", "FM 1488", "FM 518", "IH 610", "SH 288", "SH 332", "SH 225", "SH 242", "SH 249", "SH 35", "US 90A", "IH27", "SH 7", "FM 1472", "LP 20", "ODA 181-1", "ODA 181-2", "ODA 250-1", "ODA 250-2", "US 82", "SH 6", "FM 85", "LP 281", "LP 323", "SH 19", "SH 198", "SH 334", "US 259", "US 281", "FM 1695", "FM 3476", "FM 933", "IH 36", "LP 363", "SH 195", "US 84", "BU 287J", "IH 44", "SH 240", "SP 1027 ", "US 287 ", "US 55", "US 70", "SH 71"];
6161
// const baseType = ["CTB", "HMA Base"];
6262
const soilClassSub = ["GW", "GP", "GM", "GC", "SW", "SP", "SM", "SC", "ML", "CL", "OL", "MH", "CH", "OH", "Pt"];
6363

@@ -787,7 +787,7 @@ class CRCP extends Component {
787787
if (this.state.helperEl.el === event.currentTarget && freeze && this.state.helperEl.freeze) // same target
788788
this.handleCloseHelper(event);
789789
else {
790-
if ((freeze || this.state.helperEl.el) !== (event.currentTarget && freeze))
790+
if (freeze || this.state.helperEl.el !== (event.currentTarget && freeze))
791791
this.setState({ helperEl: { el: event.currentTarget, content, freeze } });
792792
}
793793
} else {
@@ -796,7 +796,7 @@ class CRCP extends Component {
796796
};
797797

798798
handleCloseHelper = (source) => {
799-
if (source.type !== "mouseleave" || source.type === "mouseleave" && this.state.helperEl && (!this.state.helperEl.freeze))
799+
if (source.type !== "mouseleave" || (source.type === "mouseleave" && this.state.helperEl && (!this.state.helperEl.freeze)))
800800
this.setState({ helperEl: undefined });
801801
};
802802

src/component/Graph.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ import Tabledata from './tableData';
44
import {withStyles} from '@material-ui/core/styles';
55
import {
66
Grid,
7-
Typography,
8-
Button,
9-
Paper,
10-
Stepper,
11-
Step,
12-
StepLabel,
13-
StepContent,
14-
TextField,
15-
Container
167
} from '@material-ui/core';
178
import * as d3 from 'd3';
189
import {tip as d3tip} from "d3-v6-tip";

src/component/report.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ class Report extends Component {
399399
</ul>
400400
</Grid>
401401
<Grid item xs={12} container style={{bottom:0,position:'absolute'}}>
402-
<Grid item xs={12}><img src={footer} style={{width:'100%',height:15,transform:'scale(-1)'}}/></Grid>
403-
<Grid item><img src={logo} style={{width:60}}/></Grid>
402+
<Grid item xs={12}><img src={footer} alt="description" style={{width:'100%',height:15,transform:'scale(-1)'}}/></Grid>
403+
<Grid item><img src={logo} alt="description" style={{width:60}}/></Grid>
404404
<Grid item xs><h3>TxCRCP-ME Analysis</h3></Grid>
405405
{/*<Grid item xs={12}><img src={footer} style={{width:'100%',height:20}}/></Grid>*/}
406406
</Grid>

src/component/tableData.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React,{ Component } from 'react';
22
import * as d3 from 'd3';
3-
import {withStyles} from "@material-ui/core/styles";
43

54
class Tabledata extends Component {
65
constructor(props) {
@@ -84,7 +83,7 @@ class Tabledata extends Component {
8483
paddingTop: '0px',
8584
paddingBottom: '0px'
8685
}}>
87-
{([1, 2, 3, 12, 8, 9, 5, 6, 7, 10, 11].indexOf(j) !== -1) ? parseFloat(c).toFixed((j == 1 || j == 12) ? 2 : ((j == 2 || j == 3 || j == 8 || j == 9) ? 0 : ((j == 5 || j == 6) ? 1 : ((j == 7) ? 3 : 4)))) : c}
86+
{([1, 2, 3, 12, 8, 9, 5, 6, 7, 10, 11].indexOf(j) !== -1) ? parseFloat(c).toFixed((j === 1 || j === 12) ? 2 : ((j === 2 || j === 3 || j === 8 || j === 9) ? 0 : ((j === 5 || j === 6) ? 1 : ((j === 7) ? 3 : 4)))) : c}
8887
</td>)}</tr>)}
8988
</table>
9089
</div>)

0 commit comments

Comments
 (0)