mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
editor/welcome: Stop on click.
Don't reset the position.
This commit is contained in:
committed by
laurensvalk
parent
545cf786af
commit
65e5e6af08
@@ -39,7 +39,7 @@ type Action =
|
||||
function reduce(state: State, action: Action): State {
|
||||
switch (action.type) {
|
||||
case ActionType.Stop:
|
||||
return { ...state, rotation: defaultRotation, rotationSpeed: 0 };
|
||||
return { ...state, rotation: state.rotation, rotationSpeed: 0 };
|
||||
case ActionType.ChangeSpeed:
|
||||
return { ...state, rotationSpeed: state.rotationSpeed + action.amount };
|
||||
case ActionType.Update:
|
||||
|
||||
Reference in New Issue
Block a user