feat: add validation to include_definition macro
This commit is contained in:
@ -514,9 +514,7 @@
|
||||
}
|
||||
|
||||
function handleKeyDown(event: KeyboardEvent) {
|
||||
const bodyIsFocused =
|
||||
document.activeElement === document.body ||
|
||||
document?.activeElement?.id === "graph";
|
||||
const bodyIsFocused = document?.activeElement?.nodeName !== "INPUT";
|
||||
|
||||
if (event.key === "l") {
|
||||
const activeNode = graph.getNode($activeNodeId);
|
||||
@ -538,7 +536,7 @@
|
||||
addMenuPosition = [mousePosition[0], mousePosition[1]];
|
||||
}
|
||||
|
||||
if (event.key === ".") {
|
||||
if (event.key === "." && bodyIsFocused) {
|
||||
const average = [0, 0];
|
||||
for (const node of $nodes.values()) {
|
||||
average[0] += node.position[0];
|
||||
|
@ -15,6 +15,8 @@
|
||||
export let id: string;
|
||||
export let isLast = false;
|
||||
|
||||
const inputType = node?.tmp?.type?.inputs?.[id]!;
|
||||
|
||||
const socketId = `${node.id}-${id}`;
|
||||
|
||||
const graph = getGraphManager();
|
||||
@ -75,8 +77,10 @@
|
||||
>
|
||||
{#key id && graphId}
|
||||
<div class="content" class:disabled={$inputSockets.has(socketId)}>
|
||||
<label for={elementId}>{input.label || id}</label>
|
||||
{#if node?.tmp?.type?.inputs?.[id]?.external !== true}
|
||||
{#if inputType.label !== false}
|
||||
<label for={elementId}>{input.label || id}</label>
|
||||
{/if}
|
||||
{#if inputType.external !== true}
|
||||
<NodeInput {elementId} {node} {input} {id} />
|
||||
{/if}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user