chiark / gitweb /
drag select: cancel selection indication properly
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Apr 2021 00:28:17 +0000 (01:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Apr 2021 00:34:54 +0000 (01:34 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 14d1d8f18dddad0ae153f3e82939ec841fd8f37f..2dfc468cc908f58bcab53584cb4a819f95e949c2 100644 (file)
@@ -1273,7 +1273,7 @@ function rectsel_mouseup(e: MouseEvent) {
   console.log('rectsel mouseup');
   window.removeEventListener('mousemove', rectsel_mousemove, true);
   window.removeEventListener('mouseup',   rectsel_mouseup,   true);
-  rectsel_path.setAttributeNS(null,'path','');
+  rectsel_path.firstElementChild!.setAttributeNS(null,'d','');
   let pos2 = rectsel_nontrivial_pos2(e);
 
   let note_already = Object.create(null);