From e12f3fe31a177786c1cd231932f003a68c961ade Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 13 Jun 2022 01:49:14 +0100 Subject: [PATCH] script: Properly update wresting warning in pane Signed-off-by: Ian Jackson --- templates/script.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/script.ts b/templates/script.ts index 09994c2f..7a4fe10c 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -558,6 +558,9 @@ function mousecursor_etc_reupdate() { let svg; let xy; let path = 'stroke-linecap="square" d="M -10 -10 10 10 M 10 -10 -10 10"'; + + document.getElementById('wresting-warning')!.innerHTML = !wresting ? "" : + " (wresting mode!)"; if (wresting) { let text; @@ -878,8 +881,6 @@ function lower_pieces(targets_todo: LowerTodoList): keyops_local['wrest'] = function (uo: UoRecord) { wresting = !wresting; - document.getElementById('wresting-warning')!.innerHTML = !wresting ? "" : - " (wresting mode!)"; ungrab_all(); mousecursor_etc_reupdate(); } -- 2.30.2