Ablative config

This commit is contained in:
2026-03-03 20:30:29 +00:00
parent 386f6fe928
commit 585e66ceb4
16 changed files with 713 additions and 71 deletions

View File

@@ -22,10 +22,13 @@ export default function Solver() {
getUnit,
setUnit,
sciNotation,
areaRatioBranch,
toggleSciNotation,
toggleAreaRatioBranch,
addVariable,
addVariables,
removeVariable,
reorderVariable,
setValue,
addPreset,
applyPropellant,
@@ -48,10 +51,20 @@ export default function Solver() {
function handleDragEnd(event) {
const { over, active } = event
if (over?.id === 'workspace') {
if (!over) {
setActiveVarId(null)
return
}
// Palette → workspace drop
if (over.id === 'workspace') {
const { varId } = active.data.current ?? {}
if (varId) addVariable(varId)
}
// Workspace → workspace reorder
else if (workspaceVarIds.includes(active.id) && workspaceVarIds.includes(over.id)) {
reorderVariable(active.id, over.id)
}
setActiveVarId(null)
}
@@ -128,6 +141,8 @@ export default function Solver() {
getUnit={getUnit}
setUnit={setUnit}
sciNotation={sciNotation}
areaRatioBranch={areaRatioBranch}
onToggleAreaRatioBranch={toggleAreaRatioBranch}
/>
<ResultsPanel
workspaceVarIds={workspaceVarIds}
@@ -147,7 +162,6 @@ export default function Solver() {
<PropellantModal
onClose={() => setShowPropellants(false)}
onApply={applyPropellant}
existingVarIds={workspaceVarIds}
/>
)}