mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-09 00:48:12 +08:00
Bezier-rs: Add joins and caps to offsets and outlines (#1083)
* Intial work * Improve miter and add round join * Get arcs to go opposite direction * Add cap and other refactors * Rename joint to join, fix some bugs * Fix single point issue * Clean up * Fix iframe sizes and update UI * Address comments and handle single point outline * Rename variables, fix branches in outline * Address comments
This commit is contained in:
committed by
Keavon Chambers
parent
7e124c8035
commit
c0576ab4e0
@@ -1,6 +1,6 @@
|
||||
import subpathFeatures, { SubpathFeatureKey } from "@graphite/features/subpath-features";
|
||||
import { renderDemoPane } from "@graphite/utils/render";
|
||||
import { Demo, DemoPane, InputOption, SubpathDemoArgs } from "@graphite/utils/types";
|
||||
import { Demo, DemoPane, SubpathDemoArgs, SubpathInputOption } from "@graphite/utils/types";
|
||||
|
||||
class SubpathDemoPane extends HTMLElement implements DemoPane {
|
||||
// Props
|
||||
@@ -8,7 +8,7 @@ class SubpathDemoPane extends HTMLElement implements DemoPane {
|
||||
|
||||
name!: string;
|
||||
|
||||
inputOptions!: InputOption[];
|
||||
inputOptions!: SubpathInputOption[];
|
||||
|
||||
triggerOnMouseMove!: boolean;
|
||||
|
||||
@@ -62,7 +62,12 @@ class SubpathDemoPane extends HTMLElement implements DemoPane {
|
||||
subpathDemo.setAttribute("triples", JSON.stringify(demo.triples));
|
||||
subpathDemo.setAttribute("closed", String(demo.closed));
|
||||
subpathDemo.setAttribute("key", this.key);
|
||||
subpathDemo.setAttribute("inputOptions", JSON.stringify(this.inputOptions));
|
||||
|
||||
const inputOptions = this.inputOptions.map((option) => ({
|
||||
...option,
|
||||
disabled: option.isDisabledForClosed && demo.closed,
|
||||
}));
|
||||
subpathDemo.setAttribute("inputOptions", JSON.stringify(inputOptions));
|
||||
subpathDemo.setAttribute("triggerOnMouseMove", String(this.triggerOnMouseMove));
|
||||
return subpathDemo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user