Skip to content

Commit e5cae7e

Browse files
committed
documents added
1 parent 464338d commit e5cae7e

3 files changed

Lines changed: 2 additions & 12 deletions

File tree

‎Project 6 Update.pdf‎

144 KB
Binary file not shown.

‎src/components/Canvas/InputField.js‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { Strategy } from '../Strategy/Strategy.js';
55
import { Options } from './options/Options.js';
66
import { ReactComponent as Play } from '../../img/play.svg'
77
import { ReactComponent as Replay } from '../../img/replay.svg'
8-
import { MergeSort } from '../Strategy/Algorithms/MergeSort.js';
9-
import { RadixSortLSD } from '../Strategy/Algorithms/RadixSortLSD.js';
108
import AlgorithmSelection from './AlgorithmSelection.js';
119
import ShowValue from './ShowValue.js';
1210

@@ -23,14 +21,11 @@ class InputField extends Component {
2321
}
2422
}
2523

26-
27-
2824
render() {
2925
const {inputArrayLength, options} = this.props.InputHandler.state;
3026
const { algorithm } = this.state;
3127
const { inputArray } = this.props;
3228

33-
3429
return (
3530
<div className="flex flex-col dark:bg-darkGray bg-gray-100 shadow-lg shadow-gray-200 h-[5em]" id="input-field-sort">
3631

@@ -45,7 +40,7 @@ class InputField extends Component {
4540
? this.props.InputHandler.setState({inputArrayLength: e.target.value.replace(/\D/g, '')})
4641
: this.props.InputHandler.setState({inputArrayLength: InputHandler.getAllowedMaxInputSize()})
4742
}}
48-
className="outline-none placeholder:text-[.95em] bg-gray-200 px-2 dark:bg-gray-600 text-gray-700 dark:text-gray-100 rounded-md text-center text-[.9em] font-semibold w-[45%] sm:w-100"
43+
className="outline-none placeholder:text-[.95em] bg-gray-200 px-2 dark:bg-gray-600 text-gray-700 dark:text-gray-100 rounded-md text-center text-[.9em] font-semibold w-[50%] sm:w-100"
4944
maximum={InputHandler.getAllowedMaxInputSize()}
5045
/>
5146
<button onClick={() => {
@@ -65,7 +60,6 @@ class InputField extends Component {
6560

6661
<Options options={this.props.InputHandler} algorithm={algorithm}/>
6762

68-
6963
<div className="flex self-center gap-3 justify-center items-center">
7064
<AlgorithmSelection strategy={this.Strategy} options={this}/>
7165
<div onClick={async () => {
@@ -75,7 +69,7 @@ class InputField extends Component {
7569
behavior: 'smooth'
7670
});
7771
this.Strategy.setOptions = options;
78-
await this.Strategy.perform(options, inputArray);
72+
await this.Strategy.perform(options,inputArray);
7973
localStorage.setItem('options', JSON.stringify(options));
8074
}
8175
}
@@ -91,7 +85,6 @@ class InputField extends Component {
9185
</div>
9286
</div>
9387
<ShowValue mainCanvasInputHandler={this.props.InputHandler} inputArrayLength={inputArrayLength}/>
94-
9588
</div>
9689
</div>
9790
</div>

‎src/components/Canvas/MainSortingCanvas.js‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import './main-canvas.css';
22
import React, { Component } from 'react'
33
import { InputHandler } from '../InputHandler/InputHandler';
4-
import SelectionSort from '../Strategy/Algorithms/SelectionSort';
5-
import { Strategy } from '../Strategy/Strategy';
64
import { Canvas } from './Canvas';
75
import { InputField } from './InputField';
8-
import { Options } from './options/Options';
96
import { CONSTANTS } from '../../Utility/config'
107
import Navigation from '../Page/partial/Navbar/Navigation';
118

0 commit comments

Comments
 (0)