mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 03:18:11 +08:00
Bezier-rs: Add trim for Subpath (#1006)
* Move compare.rs * Update traits for Subpath and ManipulatorGroup * Implement trim * UI adjustments and more tests * Add reverse, refactor code, rename variables * Improve comments * Comment nits * Address comments * Update trim behavior * Update doc comment for trim --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
ba50614af1
commit
8293f730f2
@@ -105,6 +105,15 @@ const subpathFeatures = {
|
||||
sliderOptions: [tSliderOptions],
|
||||
chooseTVariant: true,
|
||||
},
|
||||
trim: {
|
||||
name: "Trim",
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>, _: undefined, tVariant: TVariant): string => subpath.trim(options.tVariant1, options.tVariant2, tVariant),
|
||||
sliderOptions: [
|
||||
{ ...tSliderOptions, default: 0.2, variable: "tVariant1" },
|
||||
{ ...tSliderOptions, variable: "tVariant2" },
|
||||
],
|
||||
chooseTVariant: true,
|
||||
},
|
||||
};
|
||||
|
||||
export type SubpathFeatureKey = keyof typeof subpathFeatures;
|
||||
|
||||
Reference in New Issue
Block a user