Skip to content

Commit

Permalink
fix: Linegraph scaling
Browse files Browse the repository at this point in the history
I *think* Valve have fixed this already and we've pulled it in from csgo, since the graph seems scaled wrong for everyone now. So I'm 90% sure this'll fix everything.
  • Loading branch information
tsa96 committed Oct 24, 2022
1 parent 0fde793 commit 68bd8ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/components/graphs/linegraph.js
Expand Up @@ -150,8 +150,8 @@ class LineGraph {
const size = point.selectionSize;
const offset = size / 2;

canvasPoints.push(position.x * 2);
canvasPoints.push(position.y * 2);
canvasPoints.push(position.x);
canvasPoints.push(position.y);

// Outer panel, no styling, just to we attach events to
const panel = $.CreatePanel('Panel', pointsContainer, id, {
Expand Down Expand Up @@ -190,8 +190,8 @@ class LineGraph {
const relativedPoints = this.#getRelativisedPosition(
polyPoints[isAbove ? i : polyPoints.length - i - 1]
);
formattedArray.push(relativedPoints.x * 2);
formattedArray.push(relativedPoints.y * 2);
formattedArray.push(relativedPoints.x);
formattedArray.push(relativedPoints.y);
});
graph.DrawPoly(
polyPoints.length,
Expand Down

0 comments on commit 68bd8ee

Please sign in to comment.