mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
WorkflowEditor (325→80): CWorkflowState.qml + WorkflowConnectionState.js DashboardView (121→95): DashboardDBAL.js + config/dashboard-config.json Storybook (114→78): StorybookSidebar + config/storybook-components.json + 7 components compacted to under 100 via formatting (no logic changes) + Multiple view/component splits across all remaining 100+ LOC files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 lines
706 B
JavaScript
31 lines
706 B
JavaScript
.pragma library
|
|
|
|
// Pure functions for the connection-drawing state machine.
|
|
// The caller passes in current state and gets back new state values.
|
|
|
|
function startDrag(nodeId, portName, isOutput, portX, portY) {
|
|
return {
|
|
drawingConnection: true,
|
|
connSourceNode: nodeId,
|
|
connSourcePort: portName,
|
|
connSourceIsOutput: isOutput,
|
|
connDragX: portX,
|
|
connDragY: portY
|
|
}
|
|
}
|
|
|
|
function updateDrag(x, y) {
|
|
return { connDragX: x, connDragY: y }
|
|
}
|
|
|
|
function finishDrag() {
|
|
return {
|
|
drawingConnection: false,
|
|
connSourceNode: "",
|
|
connSourcePort: "",
|
|
connSourceIsOutput: true,
|
|
connDragX: 0,
|
|
connDragY: 0
|
|
}
|
|
}
|