Skip to content

Commit

Permalink
Remove the relevant area calculation code from the previous commit. I…
Browse files Browse the repository at this point in the history
…t's important that this code is captured in the git history, but it's unnecessary for it to actually run now and it pollutes the log file directory.
  • Loading branch information
adelizkeith committed Jun 25, 2023
1 parent 6809e5d commit ed1f24b
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1302,30 +1302,6 @@ export class AutoTask extends Component {
</div>
);
}

componentDidMount() {
const collection = document.getElementsByClassName("relevant");
const recs = [];

function getOffset(el) {
const rect = el.getBoundingClientRect();
return {
left: rect.left + window.scrollX,
right: rect.right + window.scrollX,
top: rect.top + window.scrollY,
bottom: rect.bottom + window.scrollY
};
}

recs.push("left,right,top,bottom")
for (var el of collection) {
const rect = getOffset(el);
const csvString = rect.left + "," + rect.right + "," + rect.top + "," + rect.bottom
recs.push(csvString);
}

writeSingleArrayToFile(recs, "brownhills_relevant");
}
}

export class AutoQuestions extends Component {
Expand Down Expand Up @@ -1514,30 +1490,6 @@ export class ManualTask extends Component {
</div>
);
}

componentDidMount() {
const collection = document.getElementsByClassName("relevant");
const recs = [];

function getOffset(el) {
const rect = el.getBoundingClientRect();
return {
left: rect.left + window.scrollX,
right: rect.right + window.scrollX,
top: rect.top + window.scrollY,
bottom: rect.bottom + window.scrollY
};
}

recs.push("left,right,top,bottom")
for (var el of collection) {
const rect = getOffset(el);
const csvString = rect.left + "," + rect.right + "," + rect.top + "," + rect.bottom
recs.push(csvString);
}

writeSingleArrayToFile(recs, "robbery_relevant");
}
}

export class ManualQuestions extends Component {
Expand Down Expand Up @@ -1701,30 +1653,6 @@ export class ControlTask extends Component {
</div>
);
}

componentDidMount() {
const collection = document.getElementsByClassName("relevant");
const recs = [];

function getOffset(el) {
const rect = el.getBoundingClientRect();
return {
left: rect.left + window.scrollX,
right: rect.right + window.scrollX,
top: rect.top + window.scrollY,
bottom: rect.bottom + window.scrollY
};
}

recs.push("left,right,top,bottom")
for (var el of collection) {
const rect = getOffset(el);
const csvString = rect.left + "," + rect.right + "," + rect.top + "," + rect.bottom
recs.push(csvString);
}

writeSingleArrayToFile(recs, "water_rail_relevant");
}
}

export class ControlQuestions extends Component {
Expand Down

0 comments on commit ed1f24b

Please sign in to comment.