Browse Source

Fix missing dummy stroke for undo event. Fix typo in listener

ssao
A.Olokhtonov 5 months ago
parent
commit
ab1659f77f
  1. 1
      client/client_recv.js
  2. 2
      client/webgl_listeners.js

1
client/client_recv.js

@ -448,6 +448,7 @@ function handle_event(state, context, event, options = {}) { @@ -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;

2
client/webgl_listeners.js

@ -151,7 +151,7 @@ function keydown(e, state, context) { @@ -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;
}

Loading…
Cancel
Save