From ab1659f77fc6723f8511b882385d76bea53c0e69 Mon Sep 17 00:00:00 2001 From: "A.Olokhtonov" Date: Sun, 30 Jun 2024 14:16:20 +0300 Subject: [PATCH] Fix missing dummy stroke for undo event. Fix typo in listener --- client/client_recv.js | 1 + client/webgl_listeners.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/client_recv.js b/client/client_recv.js index 21741ba..a5cd548 100644 --- a/client/client_recv.js +++ b/client/client_recv.js @@ -448,6 +448,7 @@ function handle_event(state, context, event, options = {}) { } case EVENT.ERASER: { + geometry_add_dummy_stroke(context); need_draw = true; const stroke = state.events[event.stroke_id]; stroke.deleted = true; diff --git a/client/webgl_listeners.js b/client/webgl_listeners.js index bef11d7..d50ba58 100644 --- a/client/webgl_listeners.js +++ b/client/webgl_listeners.js @@ -151,7 +151,7 @@ function keydown(e, state, context) { document.querySelector('.debug-window').classList.toggle('dhide'); } else if (e.code === 'KeyZ') { if (e.ctrlKey) { - queue_event(state, endo_event(state)); + queue_event(state, undo_event(state)); } else { state.zoomdown = true; }