Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: slot trunaction and ensureCorrectLayoutScale()
  • Loading branch information
simula-r committed Nov 18, 2025
commit 097b9b49cdfda590231ff861e3da46a29ae7f2ec
6 changes: 2 additions & 4 deletions src/renderer/extensions/vueNodes/components/InputSlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
/>

<!-- Slot Name -->
<div class="relative h-full flex items-center">
<div class="relative h-full flex items-center min-w-0 flex-1">
<span
v-if="!dotOnly"
:class="
cn('whitespace-nowrap text-xs font-normal lod-toggle', labelClasses)
"
:class="cn('truncate text-xs font-normal lod-toggle', labelClasses)"
>
{{ slotData.localized_name || slotData.name || `Input ${index}` }}
</span>
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/extensions/vueNodes/components/NodeSlots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div v-if="renderError" class="node-error p-2 text-sm text-red-500">
{{ st('nodeErrors.slots', 'Node Slots Error') }}
</div>
<div v-else :class="cn('flex justify-between', unifiedWrapperClass)">
<div v-else :class="cn('flex justify-between min-w-0', unifiedWrapperClass)">
<div
v-if="filteredInputs.length"
:class="cn('flex flex-col', unifiedDotsClass)"
:class="cn('flex flex-col min-w-0 flex-1', unifiedDotsClass)"
>
<InputSlot
v-for="(input, index) in filteredInputs"
Expand All @@ -19,7 +19,7 @@

<div
v-if="nodeData?.outputs?.length"
:class="cn('ml-auto flex flex-col', unifiedDotsClass)"
:class="cn('ml-auto flex flex-col min-w-0 flex-1', unifiedDotsClass)"
>
<OutputSlot
v-for="(output, index) in nodeData.outputs"
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/extensions/vueNodes/components/OutputSlot.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div v-if="renderError" class="node-error p-1 text-xs text-red-500">⚠️</div>
<div v-else v-tooltip.right="tooltipConfig" :class="slotWrapperClass">
<div class="relative h-full flex items-center">
<div class="relative h-full flex items-center min-w-0 flex-1">
<!-- Slot Name -->
<span
v-if="!dotOnly"
class="lod-toggle text-xs font-normal whitespace-nowrap text-node-component-slot-text"
class="lod-toggle text-xs font-normal truncate text-node-component-slot-text"
>
{{ slotData.localized_name || slotData.name || `Output ${index}` }}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,19 @@ export function ensureCorrectLayoutScale(
? 1 / SCALE_FACTOR
: 1

//TODO: once we remove the need for LiteGraph.NODE_TITLE_HEIGHT in vue nodes we nned to remove everything here.
for (const node of graph.nodes) {
const lgNode = lgNodesById.get(node.id)
if (!lgNode) continue

const lgBodyY = lgNode.pos[1]

const adjustedY = needsDownscale
? lgBodyY - LiteGraph.NODE_TITLE_HEIGHT / 2
: lgBodyY

const relativeX = lgNode.pos[0] - originX
const relativeY = lgBodyY - originY
const relativeY = adjustedY - originY
const newX = originX + relativeX * scaleFactor
const scaledY = originY + relativeY * scaleFactor
const newWidth = lgNode.width * scaleFactor
Expand Down
Loading