Skip to content

Commit

Permalink
Merge pull request #53 from kateter-platform/update-version-1.0.0
Browse files Browse the repository at this point in the history
Update version 1.0.0
  • Loading branch information
jonasdeluna authored Sep 24, 2023
2 parents 77e457a + 6020b10 commit 4de997f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kateter-platform/graphica-gemini",
"version": "0.0.4",
"version": "1.0.0",
"source": "./src/index.ts",
"description": "A tool for advanced graphing and visualization",
"license": "MIT",
Expand Down
16 changes: 15 additions & 1 deletion src/Components/Line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Line extends Component {
arrowheadLine.name = "arrowhead";
this.add(arrowheadLine);
}
this.updateGeometry(start, end);
this.initialUpdateGeometry(start, end);
}

public updateGeometry(
Expand Down Expand Up @@ -110,6 +110,20 @@ class Line extends Component {
}
}

private initialUpdateGeometry(start: InputPosition, end: InputPosition) {
const startPosition = toVector2(start);
const endPosition = toVector2(end);

(this.geometry as LineGeometry).setPositions([
startPosition.x,
startPosition.y,
1,
endPosition.x,
endPosition.y,
1,
]);
}

setEnd(end: InputPosition) {
this.end = end;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Plot extends Component {
numPoints = 1000,
dashed = false,
lineWidth = 1,
color = 0xff0000,
color = 0xffa500,
coefficients = {},
plotBetween = undefined,
} = { ...defaultPlotOptions, ...options };
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SVGLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SVG extends Component {
: 0x000000;

const strokeWidth =
path.userData.style.strokeWidth !== undefined
path.userData?.style.strokeWidth !== undefined
? path.userData?.style.strokeWidth
: 1;

Expand Down

0 comments on commit 4de997f

Please sign in to comment.