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 fe25433

Browse files
styled the header
1 parent aaac577 commit fe25433

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

‎src/Components/GridLayoutComponent.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class GridLayout extends Component {
7171
// change(1);
7272

7373
// updateStyle(){
74-
// for(let row=0;row<19;row++){
75-
// for(let col=0;col<60;col++){
74+
// for(let row=0;row<18;row++){
75+
// for(let col=0;col<53;col++){
7676
// document.getElementById(`node-${row}-${col}`).className = 'unvisited';
7777
// if((row===this.state.start[0] && col===this.state.start[1]))
7878
// {
@@ -89,9 +89,9 @@ class GridLayout extends Component {
8989

9090
gridRender(){
9191
const b=[];
92-
for(let row=0;row<19;row++){
92+
for(let row=0;row<18;row++){
9393
const currRow=[];
94-
for(let col=0;col<60;col++){
94+
for(let col=0;col<53;col++){
9595

9696
const val = {
9797
row,
@@ -120,9 +120,9 @@ class GridLayout extends Component {
120120

121121
grdRender(r,c){
122122
const b=[];
123-
for(let row=0;row<19;row++){
123+
for(let row=0;row<18;row++){
124124
const currRow=[];
125-
for(let col=0;col<60;col++){
125+
for(let col=0;col<53;col++){
126126

127127
const val = {
128128
row,
@@ -154,9 +154,9 @@ class GridLayout extends Component {
154154

155155
gridRerender(){
156156
const b=[];
157-
for(let row=0;row<19;row++){
157+
for(let row=0;row<18;row++){
158158
const currRow=[];
159-
for(let col=0;col<60;col++){
159+
for(let col=0;col<53;col++){
160160

161161
const val = {
162162
row,
@@ -207,9 +207,9 @@ class GridLayout extends Component {
207207

208208
generateNewGridWithPreviousWalls(){
209209
const b=[];
210-
for(let row=0;row<19;row++){
210+
for(let row=0;row<18;row++){
211211
const currRow=[];
212-
for(let col=0;col<60;col++){
212+
for(let col=0;col<53;col++){
213213
const boxes = this.state.boxes;
214214
const node = boxes[row][col];
215215
const val = {
@@ -240,9 +240,9 @@ class GridLayout extends Component {
240240
randomGridGeneration(){
241241
const b=[]
242242
if(!this.state.running){
243-
for(let row=0;row<19;row++){
243+
for(let row=0;row<18;row++){
244244
const c=[];
245-
for(let col=0;col<60;col++){
245+
for(let col=0;col<53;col++){
246246
const ran = Math.floor(Math.random()*5+1);
247247
const box= this.state.boxes;
248248

@@ -279,9 +279,9 @@ class GridLayout extends Component {
279279
randomWeightGeneration(){
280280
const b=[]
281281
if(!this.state.running){
282-
for(let row=0;row<19;row++){
282+
for(let row=0;row<18;row++){
283283
const c=[];
284-
for(let col=0;col<60;col++){
284+
for(let col=0;col<53;col++){
285285
const ran = Math.floor(Math.random()*5+1);
286286
const box= this.state.boxes;
287287

@@ -629,7 +629,7 @@ class GridLayout extends Component {
629629
document.getElementById(`node-${row-1}-${col}`).className = 'gridblock unvisited';
630630
if(col!=0)
631631
document.getElementById(`node-${row}-${col-1}`).className = 'gridblock unvisited';
632-
if(col!=59)
632+
if(col!=53)
633633
document.getElementById(`node-${row}-${col+1}`).className = 'gridblock unvisited';
634634
if(row!=18)
635635
document.getElementById(`node-${row+1}-${col}`).className = 'gridblock unvisited';

‎src/Components/HeaderComponent.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import react,{Component} from 'react';
22
import {Nav,NavLink,NavbarToggler,NavbarBrand,Collapse, NavItem,Button , Navbar,Jumbotron,Form, FormGroup, Input} from 'reactstrap';
33
import { visuaizeBFS,visualizeDijkstra } from "./GridLayoutComponent";
4-
import Img from '../images/logo.png'
4+
import Img from '../images/logo1.png'
55

66
class Header extends Component{
77
constructor(props){
@@ -66,15 +66,19 @@ class Header extends Component{
6666
return(
6767
<div>
6868
<Navbar dark expand="md" className="nav-bg">
69+
<NavbarBrand className="ml-auto" href="/">
70+
<img src= {Img} height="60" alt="Algo-Visualizer" />
71+
</NavbarBrand>
72+
73+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
74+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
75+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
76+
77+
6978
<div className="container row">
7079
<NavbarToggler onClick={this.togglefunc}/>
7180

7281
<div className="nav">
73-
<NavbarBrand className="ml-auto" href="/">
74-
<img src= {Img} height="60" alt="Algo-Visualizer" />
75-
</NavbarBrand>
76-
<br/>
77-
<br/>
7882

7983
<Collapse isOpen={this.state.isNavOpen} className="collapse navbar-collapse">
8084
<Nav className="mr-auto">

‎src/images/logo1.png

12.4 KB
Loading[フレーム]

0 commit comments

Comments
(0)

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