Skip to content

Commit

Permalink
Fixed bar sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
PhoneDroid authored and unknown committed Nov 20, 2022
1 parent e291c9b commit 1e0b516
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Source/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ let
bar_value = [] ,
cancel = false ,
animation ,
width = 2 ,
bars = [] ,
size = 35 ,
time = 0 ;
Expand Down Expand Up @@ -58,11 +57,7 @@ function onAlgorithmSelect ( event ){


function onSizeChange ( event ){

const { value } = event.target;

width = 60 / value;

size = event.target.value;
randomizeValues();
}

Expand Down Expand Up @@ -129,7 +124,7 @@ function generateBar (){
const { style } = bar;

style.height = `${ value }px`;
style.width = `${ width }%`;
style.width = `${ 60 / size }%`;

elements_bars.appendChild(bar);
bar_value.push(value);
Expand Down

0 comments on commit 1e0b516

Please sign in to comment.