Hide the left border notch in layers when a wire isn't entering from the layer's left

This commit is contained in:
Keavon Chambers
2024-11-03 15:33:29 -08:00
parent 35f7cfac80
commit 12ca06035c
6 changed files with 38 additions and 14 deletions
@@ -33,6 +33,7 @@ export function createNodeGraphState(editor: Editor) {
contextMenuInformation: undefined as ContextMenuInformation | undefined,
layerWidths: new Map<bigint, number>(),
chainWidths: new Map<bigint, number>(),
hasLeftInputWire: new Map<bigint, boolean>(),
imports: [] as { outputMetadata: FrontendGraphOutput; position: { x: number; y: number } }[],
exports: [] as { inputMetadata: FrontendGraphInput; position: { x: number; y: number } }[],
nodes: new Map<bigint, FrontendNode>(),
@@ -92,6 +93,7 @@ export function createNodeGraphState(editor: Editor) {
update((state) => {
state.layerWidths = updateLayerWidths.layerWidths;
state.chainWidths = updateLayerWidths.chainWidths;
state.hasLeftInputWire = updateLayerWidths.hasLeftInputWire;
return state;
});
});