diff --git a/client/webgl_geometry.js b/client/webgl_geometry.js index 85df64e..d7bdc89 100644 --- a/client/webgl_geometry.js +++ b/client/webgl_geometry.js @@ -250,6 +250,10 @@ function geometry_clear_oldest_prestroke(state, context, player_id) { const player = state.players[player_id]; player.strokes.shift(); + if (player.strokes.length === 0) { + player.current_prestroke = false; + } + recompute_dynamic_data(state, context); } @@ -259,6 +263,10 @@ function geometry_clear_newest_prestroke(state, context, player_id) { const player = state.players[player_id]; player.strokes.pop(); + if (player.strokes.length === 0) { + player.current_prestroke = false; + } + recompute_dynamic_data(state, context); }