mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 20:38:12 +08:00
Add the style of right-angle grid-aligned wires in the graph (#2182)
* Verticle and horizontal lines achieved(#2170) * vertical lines alligned with grid dots * fixed vertical lines positioning * Deals with cases 5 and 6 * Fixed case 5 and other problematic zones * edge cases solved * edge cases fixed: HorizontalOut & HorizontalIn * added comments * Changed midX and midY * Clean up if/else statements * Consolidate code * Consolidate further * Add preference for wire style --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
2d90bb0cbf
commit
26fa8d967e
@@ -41,6 +41,7 @@ export function createNodeGraphState(editor: Editor) {
|
||||
addExport: undefined as { x: number; y: number } | undefined,
|
||||
nodes: new Map<bigint, FrontendNode>(),
|
||||
wires: [] as FrontendNodeWire[],
|
||||
wiresDirectNotGridAligned: false,
|
||||
wirePathInProgress: undefined as WirePath | undefined,
|
||||
inputTypeDescriptions: new Map<string, string>(),
|
||||
nodeDescriptions: new Map<string, string>(),
|
||||
@@ -123,6 +124,7 @@ export function createNodeGraphState(editor: Editor) {
|
||||
state.nodes.set(node.id, node);
|
||||
});
|
||||
state.wires = updateNodeGraph.wires;
|
||||
state.wiresDirectNotGridAligned = updateNodeGraph.wiresDirectNotGridAligned;
|
||||
return state;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user