fix: allow dragging all gates + stop waveform recording on edits
- INPUT/CLOCK gates can now be dragged (click-without-move = toggle, click-and-drag = move). Uses 4px movement threshold. - Waveform only records samples on intentional actions (INPUT toggle, manual step, simulation tick), not on gate placement/movement/connections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,12 +53,12 @@ export function evaluate(gate, visited = new Set()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function evaluateAll() {
|
||||
export function evaluateAll(recordWave = false) {
|
||||
state.gates.forEach(g => {
|
||||
if (g.type !== 'INPUT' && g.type !== 'CLOCK') g.value = 0;
|
||||
});
|
||||
state.gates.forEach(g => evaluate(g));
|
||||
if (state.recording && state.waveformVisible) recordSample();
|
||||
if (recordWave && state.recording && state.waveformVisible) recordSample();
|
||||
}
|
||||
|
||||
// Register evaluateAll in waveform to break circular dependency
|
||||
|
||||
Reference in New Issue
Block a user