add in tooltip

This commit is contained in:
ari committed 2022-07-10 14:13:31 -04:00
1 parent edb3dafe12
commit 649c1fbdeb
7 files changed
+58 -14

No files matched your search

@@ -22,7 +22,7 @@ export const DEFAULT_DIMS: DAGDims = {
width: CIRCLE_SIZE,
},
distanceFactor: {
node: 2,
node: 1.5,
collection: 1.25,
},
position: {
@@ -15,6 +15,7 @@ import {
import { AutomationCondition } from "types/automations/conditions";
import { CollectionNodeMaker } from "../nodes/CollectionNode";
import { SequenceNodeMaker } from "../nodes/SequenceNode";
import { getNodeType } from "utils/automations";
export const makeAutomationNodes = (
automation: AutomationActionData,
@@ -70,7 +71,7 @@ export const makeTriggerNodes: ElementMaker<AutomationTrigger> = (
CollectionNodeMaker.makeElement({ id: nodeId, position }, dims, {
...dims.trigger,
color: "red",
onAddNode: () => stateUpdater.basic.trigger.addNode(),
onAddNode: () => stateUpdater.basic.trigger.addNode(null),
nodes: nodes.map((node, index) => ({
enabled: node.enabled ?? true,
label: getDescriptionFromAutomationNode(node, namer, true),
@@ -97,7 +98,7 @@ export const makeConditionNodes: ElementMaker<AutomationCondition> = (
...dims.condition,
color: "blue",
hasInput: !!lastNodeId,
onAddNode: stateUpdater.basic.condition.addNode,
onAddNode: () => stateUpdater.basic.condition.addNode(null),
nodes: nodes.map((node, index) => ({
enabled: node.enabled ?? true,
label: getDescriptionFromAutomationNode(node, namer, true),
@@ -142,7 +143,7 @@ export const makeSequenceNodes: ElementMaker<AutomationSequenceNode> = (
},
dims,
{
color: "green",
color: getNodeType(node) === "action" ? "green" : "blue",
enabled: node.enabled ?? true,
hasInput: true,
label: getDescriptionFromAutomationNode(node, namer, true),