diff --git a/app/gui2/shared/ast/tree.ts b/app/gui2/shared/ast/tree.ts index 323a6dd0a1d..ef4305e5849 100644 --- a/app/gui2/shared/ast/tree.ts +++ b/app/gui2/shared/ast/tree.ts @@ -798,6 +798,10 @@ export class AutoscopedIdentifier extends Ast { super(module, fields) } + get identifier(): Token { + return this.module.getToken(this.fields.get('identifier').node) + } + static tryParse( source: string, module?: MutableModule, diff --git a/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue b/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue index 610d496b105..1b826d87814 100644 --- a/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue +++ b/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue @@ -210,6 +210,7 @@ provideSelectionArrow( // It will be used to place the dropdown arrow under the constructor name. let node = props.input.value while (node instanceof Ast.Ast) { + if (node instanceof Ast.AutoscopedIdentifier) return node.identifier.id if (node instanceof Ast.PropertyAccess) return node.rhs.id if (node instanceof Ast.App) node = node.function else break @@ -404,7 +405,7 @@ declare module '@/providers/widgetRegistry' { flex-direction: row; align-items: center; position: relative; - min-height: --node-port-height; + min-height: var(--node-port-height); } .arrow { diff --git a/app/gui2/src/components/GraphEditor/widgets/WidgetSelectionArrow.vue b/app/gui2/src/components/GraphEditor/widgets/WidgetSelectionArrow.vue index 30f70ab559b..1f7f175362d 100644 --- a/app/gui2/src/components/GraphEditor/widgets/WidgetSelectionArrow.vue +++ b/app/gui2/src/components/GraphEditor/widgets/WidgetSelectionArrow.vue @@ -24,17 +24,15 @@ onUnmounted(() => info && (info.handled = false))