* add origin * cleanup pivot * a lot of stuff * reset pivot * fix transform with pivot issues * fixes * some more cleanup * fixes * finally works * origin fixes * fix spaces * fix using dragged_layers * simplify pivot logic * fix bugs * fix the final bug * fix in select_tool * fix updates * some more refactors to fix misunderstanding and refactor * add checkboxes * fix labels * fix stuff which broke at merge * update * cargo fmt * fix serde crash * fix pivot not updating on move * fix pivot not becoming last active refernce * fix redraw issues * add: active pivot * cargo fmt * fix pivot showing up in default mode * add: pivot pin * fix: use pin icons * cargo: cargo lock update? * fix: use checkbox instead of Overlays * refactor: add dot to path_tool * add: active origins * UI tweaks * add: add all of the stuff for path tool * remove: unused layer * fix: pivot pinning and origin angle * fix: pin only if moved in first place * cargo: fmt * fix: pivot use disabled method * fix: remove redudant NoOp * fix: 3 stuff * fix: select from elsewhere * fix: compass rose wobbling around * add: move pivot on grab * add: move pivot on nudge * add: move pivot on Grab * Code review and tooltips * fixes * fixes * fixes * fix: skipping artboard on bounds calculation * fix: by default have origin * Fix prior fix --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
Overview of /frontend/src/components/
Each component represents a (usually reusable) part of the Graphite editor GUI. These all get mounted in Editor.svelte (in the /src directory above this one).
Floating Menus: floating-menus/
The temporary UI areas with dark backgrounds which hover over the top of the editor window content. Examples include menu lists, popovers, and dialogs.
Layout: layout/
Useful containers that control the flow of content held within.
Panels: panels/
The dockable tabbed regions like the Document, Properties, Layers, and Node Graph panels.
Widgets: widgets/
The interactive input items used to display information and provide user control.
Window: window/
The building blocks for the Title Bar, Workspace, and Status Bar within an editor application window.
Svelte tips and tricks
This section contains a growing list of quick reference information for helpful Svelte solutions and best practices. Feel free to add to this to help contributors learn things, or yourself remember tricks you'll likely forget in a few months.
Bi-directional props
The component declares this:
// The dispatcher that sends the changed value as a custom event to the parent
const dispatch = createEventDispatcher<{ theBidirectionalProperty: number }>();
// The prop
export let theBidirectionalProperty: number;
// Called only when `theBidirectionalProperty` is changed from outside this component via its props
$: console.log(theBidirectionalProperty);
// Example of a method that would update the value
function doSomething() {
dispatch("theBidirectionalProperty", SOME_NEW_VALUE);
},
Users of the component do this for theCorrespondingDataEntry to be a two-way binding:
let theCorrespondingDataEntry = 42;
<DropdownInput
theBidirectionalProperty={theCorrespondingDataEntry}
on:theBidirectionalProperty={({ detail }) => { theCorrespondingDataEntry = detail; }}
/>