|
19 | 19 | outlineClass, |
20 | 20 | { |
21 | 21 | 'animate-pulse': executing, |
22 | | - 'opacity-50 before:rounded-2xl before:pointer-events-none before:absolute before:bg-bypass/60 before:inset-0': |
| 22 | + 'before:rounded-2xl before:pointer-events-none before:absolute before:bg-bypass/60 before:inset-0': |
23 | 23 | bypassed, |
24 | | - 'opacity-50 before:rounded-2xl before:pointer-events-none before:absolute before:inset-0': |
| 24 | + 'before:rounded-2xl before:pointer-events-none before:absolute before:inset-0': |
25 | 25 | muted, |
26 | 26 | 'will-change-transform': isDragging |
27 | 27 | }, |
@@ -174,26 +174,20 @@ const { |
174 | 174 |
|
175 | 175 | useVueElementTracking(() => nodeData.id, 'node') |
176 | 176 |
|
177 | | -const { selectedNodeIds } = storeToRefs(useCanvasStore()) |
178 | | -
|
179 | | -// Inject transform state for coordinate conversion |
180 | 177 | const transformState = inject(TransformStateKey) |
181 | 178 | if (!transformState) { |
182 | 179 | throw new Error( |
183 | 180 | 'TransformState must be provided for node resize functionality' |
184 | 181 | ) |
185 | 182 | } |
186 | 183 |
|
187 | | -// Computed selection state - only this node re-evaluates when its selection changes |
| 184 | +const { selectedNodeIds } = storeToRefs(useCanvasStore()) |
188 | 185 | const isSelected = computed(() => { |
189 | 186 | return selectedNodeIds.value.has(nodeData.id) |
190 | 187 | }) |
191 | 188 |
|
192 | | -// Use execution state composable |
193 | 189 | const nodeLocatorId = computed(() => getLocatorIdFromNodeData(nodeData)) |
194 | 190 | const { executing, progress } = useNodeExecutionState(nodeLocatorId) |
195 | | -
|
196 | | -// Direct access to execution store for error state |
197 | 191 | const executionStore = useExecutionStore() |
198 | 192 | const hasExecutionError = computed( |
199 | 193 | () => executionStore.lastExecutionErrorNodeId === nodeData.id |
@@ -225,9 +219,16 @@ const nodeBodyBackgroundColor = computed(() => { |
225 | 219 | ) |
226 | 220 | }) |
227 | 221 |
|
228 | | -const nodeOpacity = computed( |
229 | | - () => useSettingStore().get('Comfy.Node.Opacity') ?? 1 |
230 | | -) |
| 222 | +const nodeOpacity = computed(() => { |
| 223 | + const globalOpacity = useSettingStore().get('Comfy.Node.Opacity') ?? 1 |
| 224 | +
|
| 225 | + // For muted/bypassed nodes, apply the 0.5 multiplier on top of global opacity |
| 226 | + if (bypassed.value || muted.value) { |
| 227 | + return globalOpacity * 0.5 |
| 228 | + } |
| 229 | +
|
| 230 | + return globalOpacity |
| 231 | +}) |
231 | 232 |
|
232 | 233 | // Use canvas interactions for proper wheel event handling and pointer event capture control |
233 | 234 | const { handleWheel, shouldHandleNodePointerEvents } = useCanvasInteractions() |
|
0 commit comments