Implemented "Clear Traces" tool

This commit is contained in:
Ladd 2025-12-29 02:09:22 -06:00
parent dc4d92c9cd
commit 56414a7ca1
2 changed files with 8 additions and 1 deletions

View File

@ -19,7 +19,7 @@ TODO
- [ ] Zoom Easing
- [ ] 2-touch Pan & Zoom
- [ ] Multi-touch Mass Create
- [ ] Tool to Clear Traces
- [x] Tool to Clear Traces
- [ ] Undo feature:
- [ ] Undo "Clear Traces" Action
- [ ] Undo "Reset

View File

@ -87,5 +87,12 @@ export class PlayPause extends Tool {
this.updateButtons();
}
});
clearTraces.addEventListener('click', () => {
// Obliterate object histories
this.sim.objects.forEachObject(obj => {
obj.history = [];
}, null);
});
}
}