@@ -18,16 +18,6 @@ import { mergeInputSpec } from '@/utils/nodeDefUtil'
1818import { applyTextReplacements } from '@/utils/searchAndReplace'
1919import { isPrimitiveNode } from '@/utils/typeGuardUtil'
2020
21- const VALID_TYPES = [
22- 'STRING' ,
23- 'combo' ,
24- 'number' ,
25- 'toggle' ,
26- 'BOOLEAN' ,
27- 'text' ,
28- 'string'
29- ]
30-
3121const replacePropertyName = 'Run widget replace on values'
3222export class PrimitiveNode extends LGraphNode {
3323 controlValues ?: any [ ]
@@ -352,31 +342,6 @@ export class PrimitiveNode extends LGraphNode {
352342 }
353343 }
354344
355- isValidWidgetLink (
356- originSlot : number ,
357- targetNode : LGraphNode ,
358- targetWidget : IWidget
359- ) {
360- const config2 = getConfig . call ( targetNode , targetWidget . name ) ?? [
361- targetWidget . type ,
362- targetWidget . options || { }
363- ]
364- if ( ! isConvertibleWidget ( targetWidget , config2 ) ) return false
365-
366- const output = this . outputs [ originSlot ]
367- if (
368- ! (
369- output . widget ?. [ CONFIG ] ??
370- ( output . widget ?. [ GET_CONFIG ] as ( ) => InputSpec ) ?.( )
371- )
372- ) {
373- // No widget defined for this primitive yet so allow it
374- return true
375- }
376-
377- return ! ! mergeIfValid . call ( this , output , config2 )
378- }
379-
380345 #isValidConnection( input : INodeInputSlot , forceUpdate ?: boolean ) {
381346 // Only allow connections where the configs match
382347 const output = this . outputs ?. [ 0 ]
@@ -445,13 +410,6 @@ function getConfig(this: LGraphNode, widgetName: string) {
445410 )
446411}
447412
448- function isConvertibleWidget ( widget : IWidget , config : InputSpec ) : boolean {
449- return (
450- // @ts -expect-error InputSpec is not typed correctly
451- VALID_TYPES . includes ( widget . type ) || VALID_TYPES . includes ( config [ 0 ] )
452- )
453- }
454-
455413/**
456414 * Convert a widget to an input slot.
457415 * @deprecated Widget to socket conversion is no longer necessary, as they co-exist now.
0 commit comments