Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3cb6c96

Browse files
Updated CSS to decrease the size of Header component & aligned buttons
1 parent 9862922 commit 3cb6c96

File tree

6 files changed

+789
-856
lines changed

6 files changed

+789
-856
lines changed

‎src/Components/GridBlockComponent.js

Lines changed: 24 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,37 @@ import '../css/gridblock.css';
33
import GridLayout from './GridLayoutComponent';
44

55
export default class GridBlockComponent extends Component {
6-
constructor(props){
6+
7+
constructor(props) {
78
super(props);
89
}
9-
funcChild = (val) =>{
10+
11+
funcChild = (val) => {
1012
this.props.chng.func(val);
1113
}
14+
1215
render() {
13-
const st = <i className="fa fa-chevron-right"></i>
14-
const ed = <i className="fa fa-circle"></i>
16+
const st = <i className="fa fa-chevron-right"></i>
17+
const ed = <i className="fa fa-circle"></i>
1518

1619
const onMouseDown = this.props.onMouseDown;
1720
const onMouseUp = this.props.onMouseUp;
1821
const onMouseEnter = this.props.onMouseEnter;
19-
20-
const clsName =this.props.iswall ? "node-wall" : '' ;
21-
22-
23-
// console.log("render",this.props.row," ",this.props.col," ",this.props.start);
24-
const s = ((this.props.row==this.props.startnode[0]) && (this.props.col == this.props.startnode[1]));
25-
const e = ((this.props.row==this.props.endnode[0]) && (this.props.col == this.props.endnode[1]));
26-
27-
return (
28-
29-
30-
31-
32-
<div id={`node-${this.props.row}-${this.props.col}`} className={`grid-block ${this.props.start?'start':this.props.end?'end':'unvisited'} ${clsName}`}
33-
34-
onMouseDown={() => this.props.onMouseDown(this.props.row,this.props.col)}
35-
onMouseEnter={() => this.props.onMouseEnter(this.props.row,this.props.col)}
36-
onMouseUp={() => this.props.onMouseUp()}
37-
38-
>
39-
{/* <Board id={`board-${this.props.row}-${this.props.col}`} className={`board`} row={this.props.row} col={this.props.col} grdRender={this.props.grdRender.bind(this)} funcChd={this.funcChild.bind(this)}>
40-
{ this.props.unchanged && (this.props.start||this.props.end)
41-
42-
?
43-
44-
<Card id={`card-${this.props.row}-${this.props.col}`} className={`card`} draggable={this.props.unchanged && (this.props.start || this.props.end) ? true: false } row={this.props.row} col={this.props.col} funcChd={this.funcChild.bind(this)}>
45-
46-
{console.log("row"+this.props.row +" "+ this.props.col)}
47-
{console.log(this.props.unchanged)}
48-
{ this.props.start ? st:'' }
49-
{ this.props.end ? ed:'' }
50-
51-
</Card>
52-
:
53-
''
54-
}
55-
</Board> */}
56-
57-
</div>
58-
59-
)
22+
23+
const clsName = this.props.iswall ? "node-wall" : '';
24+
25+
const s = ((this.props.row == this.props.startnode[0]) && (this.props.col == this.props.startnode[1]));
26+
const e = ((this.props.row == this.props.endnode[0]) && (this.props.col == this.props.endnode[1]));
27+
28+
return ( <
29+
div id = { `node-${this.props.row}-${this.props.col}` }
30+
className = { `grid-block ${this.props.start ? 'start' : this.props.end ? 'end' : 'unvisited'} ${clsName}` }
31+
onMouseDown = {
32+
() => this.props.onMouseDown(this.props.row, this.props.col) }
33+
onMouseEnter = {
34+
() => this.props.onMouseEnter(this.props.row, this.props.col) }
35+
onMouseUp = {
36+
() => this.props.onMouseUp() } > < /div>
37+
);
6038
}
61-
}
39+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /