diff --git a/src/app/globals.css b/src/app/globals.css index e5b2dfca..a2a645f5 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -141,6 +141,12 @@ body { background: #737373; } +/* Make the multi-selection box pass through pointer events so we can still + interact with handles, resize controls, and other node elements */ +.react-flow__nodesselection-rect { + pointer-events: none !important; +} + /* Edge pulse animation for loading connectors */ @keyframes flowPulse { 0% { diff --git a/src/components/AnnotationModal.tsx b/src/components/AnnotationModal.tsx index 006c4c71..9ac23572 100644 --- a/src/components/AnnotationModal.tsx +++ b/src/components/AnnotationModal.tsx @@ -481,7 +481,7 @@ export function AnnotationModal() { type="text" autoFocus defaultValue={(annotations.find((a) => a.id === editingTextId) as TextShape)?.text || ""} - className="w-full px-2 py-1.5 text-sm border border-gray-200 rounded mb-3 focus:outline-none focus:ring-1 focus:ring-gray-300" + className="w-full px-2 py-1.5 text-sm text-gray-900 border border-gray-200 rounded mb-3 focus:outline-none focus:ring-1 focus:ring-gray-300" onKeyDown={(e) => { if (e.key === "Enter") { updateAnnotation(editingTextId, { text: (e.target as HTMLInputElement).value }); setEditingTextId(null); } if (e.key === "Escape") setEditingTextId(null); diff --git a/src/components/FloatingActionBar.tsx b/src/components/FloatingActionBar.tsx index b1248894..06c16f2b 100644 --- a/src/components/FloatingActionBar.tsx +++ b/src/components/FloatingActionBar.tsx @@ -26,10 +26,17 @@ function NodeButton({ type, label }: NodeButtonProps) { addNode(type, position); }; + const handleDragStart = (event: React.DragEvent) => { + event.dataTransfer.setData("application/node-type", type); + event.dataTransfer.effectAllowed = "copy"; + }; + return ( {label} @@ -71,6 +78,12 @@ function GenerateComboButton() { setIsOpen(false); }; + const handleDragStart = (event: React.DragEvent, type: NodeType) => { + event.dataTransfer.setData("application/node-type", type); + event.dataTransfer.effectAllowed = "copy"; + setIsOpen(false); + }; + return (
- {dropType === "workflow" ? "Drop to load workflow" : "Drop image to create node"} + {dropType === "workflow" + ? "Drop to load workflow" + : dropType === "node" + ? "Drop to create node" + : "Drop image to create node"}
- {nodeData.outputText} -
+ {nodeData.outputText} +