Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 044de05

Browse files
committed
Sort in each animation from small to big
1 parent 215bb57 commit 044de05

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

src/components/SortingAnimation.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class SortingAnimation extends React.Component {
1616
this.chart = new Chart(myChartRef, {
1717
type: "bar",
1818
data: {
19-
//Bring in data
2019
labels: this.props.data,
2120
datasets: [
2221
{
@@ -26,7 +25,6 @@ class SortingAnimation extends React.Component {
2625
]
2726
},
2827
options: {
29-
//Customize chart options
3028
animation: {
3129
duration: 0
3230
},
@@ -96,20 +94,3 @@ class SortingAnimation extends React.Component {
9694
}
9795

9896
export default SortingAnimation;
99-
100-
/*
101-
LiveServer
102-
Live Sass Compiler
103-
html and css support (Klass im CSS werden automatisch im HTML File vorgeschlagen)
104-
auto rename tag (auto rename anding tag with beginning tag in html files)
105-
Prettier
106-
Java Script ES6 code snippets
107-
Turbo Console log (hepls for dugging (LOGGER))
108-
indent-rainbow (color for indents)
109-
Bracket Pair Colorizer
110-
Code Spell Checker (Tells you if a variable isn't known)
111-
REST Client
112-
Git Lens (Git repository durchstöbern, zeigt für jede Codezeile an wer sie bearbeitet und aktualisiert hat)
113-
Auto-Open Markdown Preview (Git Hub read me)
114-
ES7 React/Redux/GraphQL/React-Native snippets
115-
*/

src/components/Sortings.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ class Sortings extends React.Component {
134134
</div>
135135
<div className="animations">
136136
{st.map(sorter => (
137-
// hier nochmal schauen ich denke reakt erkennt nich das die anderen schon dargestellten komponenten auch wieder aktualisiert werden müssen
138137
<div
139138
className="animation"
140139
style={sorterWidth}

src/components/sorter/BubbleSort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class BubbleSort extends React.Component {
1919
let ended = false;
2020
if (curRun[0] < numbers.length - 1) {
2121
if (curRun[1] < numbers.length - curRun[0] - 1) {
22-
if (numbers[curRun[1]] < numbers[curRun[1] + 1]) {
22+
if (numbers[curRun[1]] > numbers[curRun[1] + 1]) {
2323
let temp = numbers[curRun[1]];
2424
numbers[curRun[1]] = numbers[curRun[1] + 1];
2525
numbers[curRun[1] + 1] = temp;

src/style/_sortings.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@
1212
display: flex;
1313
flex-flow: row wrap;
1414
justify-content: center;
15+
16+
.animation {
17+
min-width: 300px;
18+
max-width: 90%;
19+
}
1520
}
1621
}

0 commit comments

Comments
 (0)