mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 11:58:11 +08:00
Fix regression where tooltip node descriptions in the graph stopped showing (#3639)
* Fix tooltips * Convert DefinitionIdentifier to string in JavaScript * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
c60ddcf875
commit
c13647aef4
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, getContext, onMount } from "svelte";
|
||||
|
||||
import type { DefinitionIdentifier, FrontendNodeType } from "@graphite/messages";
|
||||
import type { FrontendNodeType } from "@graphite/messages";
|
||||
import type { NodeGraphState } from "@graphite/state-providers/node-graph";
|
||||
|
||||
import LayoutCol from "@graphite/components/layout/LayoutCol.svelte";
|
||||
@@ -9,7 +9,7 @@
|
||||
import TextInput from "@graphite/components/widgets/inputs/TextInput.svelte";
|
||||
import TextLabel from "@graphite/components/widgets/labels/TextLabel.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher<{ selectNodeType: DefinitionIdentifier }>();
|
||||
const dispatch = createEventDispatcher<{ selectNodeType: string }>();
|
||||
const nodeGraph = getContext<NodeGraphState>("nodeGraph");
|
||||
|
||||
// Content
|
||||
@@ -125,7 +125,7 @@
|
||||
{disabled}
|
||||
label={nodeType.name}
|
||||
tooltipLabel={nodeType.name}
|
||||
tooltipDescription={$nodeGraph.nodeDescriptions.get(nodeType.identifier)}
|
||||
tooltipDescription={nodeType.identifier ? $nodeGraph.nodeDescriptions.get(nodeType.identifier) : undefined}
|
||||
action={() => dispatch("selectNodeType", nodeType.identifier)}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user