Skip to content

Commit

Permalink
Bugfix for Ui elements
Browse files Browse the repository at this point in the history
  • Loading branch information
ricknjacky authored and meganindya committed Jan 26, 2021
1 parent dce590d commit 11bde18
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/widgets/temperament.js
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ class TemperamentWidget {
let compareRatios = [];
this.tempRatios = this.ratios.slice();

calculateRatios = (i) => {
const calculateRatios = (i) => {
if (frequency[i] < this.frequencies[len - 1]) {
for (let j = 0; j < this.tempRatios.length; j++) {
ratioDifference[j] = ratio[i] - this.tempRatios[j];
Expand Down Expand Up @@ -1027,18 +1027,18 @@ class TemperamentWidget {
docById("preview").style.marginLeft = "100px";

//make temperary
ratios = this.tempRatios.slice();
this.ratios = this.tempRatios.slice();
this.typeOfEdit = "nonequal";
this.NEqTempPitchNumber = ratios.length - 1;
this.NEqTempPitchNumber = this.ratios.length - 1;
frequency1 = this.frequencies[0];
this.NEqTempHzs = [];
for (let i = 0; i <= this.NEqTempPitchNumber; i++) {
this.NEqTempHzs[i] = ratios[i] * frequency1;
this.NEqTempHzs[i] = this.ratios[i] * frequency1;
this.NEqTempHzs[i] = this.NEqTempHzs[i].toFixed(2);
}

for (let i = 0; i < ratios.length; i++) {
compareRatios[i] = ratios[i];
for (let i = 0; i < this.ratios.length; i++) {
compareRatios[i] = this.ratios[i];
compareRatios[i] = compareRatios[i].toFixed(2);
}
this.checkTemperament(compareRatios);
Expand Down

0 comments on commit 11bde18

Please sign in to comment.