chiark / gitweb /
script: Properly update wresting warning in pane
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 13 Jun 2022 00:49:14 +0000 (01:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Jun 2022 09:23:42 +0000 (10:23 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 09994c2f491f322d603d28983621b03eb09fc269..7a4fe10ca5194bd99f1867844ddead67763cb8ef 100644 (file)
@@ -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 ? "" :
+    " <strong>(wresting mode!)</strong>";
   
   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 ? "" :
-    " <strong>(wresting mode!)</strong>";
   ungrab_all();
   mousecursor_etc_reupdate();
 }