fix some things

This commit is contained in:
Joeri Exelmans 2025-10-21 23:30:27 +02:00
parent 6202934ac4
commit 523e00d5dc
4 changed files with 2 additions and 6 deletions

View file

@ -314,7 +314,6 @@ export function App() {
)} )}
</select> </select>
{rtIdx!==undefined && <plant.render {...plantStates[rtIdx]}/>} {rtIdx!==undefined && <plant.render {...plantStates[rtIdx]}/>}
{/* <DigitalWatch alarm={true} light={true} h={12} m={30} s={33}/> */}
</PersistentDetails> </PersistentDetails>
</Box> </Box>
</Stack> </Stack>

View file

@ -43,7 +43,7 @@ export function DigitalWatch({light, h, m, s, alarm, callbacks}: DigitalWatchPro
: <image width="222" height="236" xlinkHref={imgWatch}/> : <image width="222" height="236" xlinkHref={imgWatch}/>
} }
<text x="111" y="126" dominant-baseline="middle" text-anchor="middle" fontFamily="digital-font" fontSize={28} style={{whiteSpace:'preserve'}}>{hhmmss}</text> <text x="111" y="126" dominantBaseline="middle" textAnchor="middle" fontFamily="digital-font" fontSize={28} style={{whiteSpace:'preserve'}}>{hhmmss}</text>
<rect x="0" y="59" width="16" height="16" fill="#fff" fill-opacity="0" <rect x="0" y="59" width="16" height="16" fill="#fff" fill-opacity="0"
onMouseDown={() => callbacks.onTopLeftPressed()} onMouseDown={() => callbacks.onTopLeftPressed()}

View file

@ -79,8 +79,6 @@ export function VisualEditor({state, setState, ast, setAST, rt, errors, setError
const [dragging, setDragging] = useState(false); const [dragging, setDragging] = useState(false);
console.log(ast);
// uid's of selected rountangles // uid's of selected rountangles
// const [selection, setSelection] = useState<Selection>([]); // const [selection, setSelection] = useState<Selection>([]);
const selection = state.selection || []; const selection = state.selection || [];

View file

@ -169,7 +169,6 @@ export function enterStates(simtime: number, state: ConcreteState, toEnter: Set<
// exit the given state and all its active descendants // exit the given state and all its active descendants
export function exitCurrent(simtime: number, state: ConcreteState, rt: EnteredScope): ActionScope { export function exitCurrent(simtime: number, state: ConcreteState, rt: EnteredScope): ActionScope {
console.log('exitCurrent', state);
let {enteredStates, history, ...actionScope} = rt; let {enteredStates, history, ...actionScope} = rt;
if (enteredStates.has(state.uid)) { if (enteredStates.has(state.uid)) {
@ -298,7 +297,7 @@ export function fireTransition(simtime: number, t: Transition, ts: Map<string, T
const srcPath = computePath({ancestor: arena, descendant: t.src as ConcreteState}).reverse() as ConcreteState[]; const srcPath = computePath({ancestor: arena, descendant: t.src as ConcreteState}).reverse() as ConcreteState[];
console.log('arena:', arena, 'srcPath:', srcPath); // console.log('arena:', arena, 'srcPath:', srcPath);
// exit src and other states up to arena // exit src and other states up to arena
({environment, history, ...rest} = exitCurrent(simtime, srcPath[0], {environment, enteredStates: mode, history, ...rest})) ({environment, history, ...rest} = exitCurrent(simtime, srcPath[0], {environment, enteredStates: mode, history, ...rest}))