From 9d8a005e13b2402f871edbe588ec1b0f0e7542f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A4=AA?= Date: Sun, 20 Oct 2013 20:46:34 +1100 Subject: [PATCH] Allow releasing mouse anywhere to stop bracket dragging We can do this now since the bracket is now clamped inside it's area, so releasing the mouse outside of it won't hide the bracket --- js/client-tournament.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/client-tournament.js b/js/client-tournament.js index d8779370d..e93d876ff 100644 --- a/js/client-tournament.js +++ b/js/client-tournament.js @@ -59,8 +59,6 @@ innerX = e.pageX - this.offsetLeft; innerY = e.pageY - this.offsetTop; isMouseDown = true; - }).on('mouseup', function () { - isMouseDown = false; }); $(document).on('mousemove', function (e) { @@ -74,6 +72,8 @@ top: position.top }); } + }).on('mouseup', function () { + isMouseDown = false; }); }