Bezier-rs: Insert function for subpath (#876)

* Add manipulator

* Add manipulator group

* Add UI

* Address comments and rebase

* Renamed add_manipulator_group to insert

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
This commit is contained in:
Hannah Li
2023-01-12 18:26:25 -08:00
committed by Keavon Chambers
co-authored by Rob Nadal
parent 23b4306eab
commit 05a2cd32a5
5 changed files with 194 additions and 0 deletions
@@ -601,6 +601,13 @@ export default defineComponent({
name: "Constructor",
callback: (subpath: WasmSubpathInstance): string => subpath.to_svg(),
},
{
name: "Insert",
callback: (subpath: WasmSubpathInstance, options: Record<string, number>, _: undefined, computeType: ComputeType): string => subpath.insert(options.computeArgument, computeType),
sliderOptions: [{ ...tSliderOptions, variable: "computeArgument" }],
// TODO: Uncomment this after implementing the Euclidean version
// chooseComputeType: true,
},
{
name: "Length",
callback: (subpath: WasmSubpathInstance): string => subpath.length(),