mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-08 07:58:11 +08:00
Bezier-rs: Remove unused legacy drawing components and structs (#853)
* Removed unused legacy drawing components * Removed Point abstraction from frontend code * Code review fixes * Helper lambdas to functions Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
2994afa6b8
commit
a220bfa759
@@ -1,6 +1,6 @@
|
||||
import { BezierCurveType, WasmBezierConstructorKey } from "@/utils/types";
|
||||
|
||||
export const getCurveType = (numPoints: number): BezierCurveType => {
|
||||
export function getCurveType(numPoints: number): BezierCurveType {
|
||||
switch (numPoints) {
|
||||
case 2:
|
||||
return BezierCurveType.Linear;
|
||||
@@ -11,9 +11,9 @@ export const getCurveType = (numPoints: number): BezierCurveType => {
|
||||
default:
|
||||
throw new Error("Invalid number of points for a bezier");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const getConstructorKey = (bezierCurveType: BezierCurveType): WasmBezierConstructorKey => {
|
||||
export function getConstructorKey(bezierCurveType: BezierCurveType): WasmBezierConstructorKey {
|
||||
switch (bezierCurveType) {
|
||||
case BezierCurveType.Linear:
|
||||
return "new_linear";
|
||||
@@ -24,4 +24,4 @@ export const getConstructorKey = (bezierCurveType: BezierCurveType): WasmBezierC
|
||||
default:
|
||||
throw new Error("Invalid value for a BezierCurveType");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user