* Now it resizes on mousemove instead of mouseup. Very nice animated effect.
authorArt Cancro <ajc@citadel.org>
Tue, 8 Nov 2005 05:44:50 +0000 (05:44 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 8 Nov 2005 05:44:50 +0000 (05:44 +0000)
webcit/ChangeLog
webcit/static/wclib.js

index 82fc2efdaae59c1f2b79df42b79ee075da135838..2efb0aff7d290f26617202cc28ad08f58ae04844 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Tue Nov  8 00:44:19 EST 2005 ajc
+* Now it resizes on mousemove instead of mouseup.  Very nice animated effect.
+
 Tue Nov  8 00:36:46 EST 2005 ajc
 * First cut of message list resize.  It works but it resizes on mouseup.
 
index 63fcd74525e6d2de46d7b58460263e4d5837ba75..960ad4227fde8732c6e8742001d2f0deaca52dbf 100644 (file)
@@ -168,9 +168,13 @@ var saved_y = 0;
 
 function ml_up(evt) {
        document.onmouseup = null;
+       document.onmousemove = null;
        if (document.layers) {
-               document.releaseEvents(Event.MOUSEUP);
+               document.releaseEvents(Event.MOUSEUP | Event.MOUSEMOVE);
        }
+}
+
+function ml_move(evt) {
        y = (ns6 ? evt.clientY : event.clientY);
        increment = y - saved_y;
 
@@ -213,12 +217,15 @@ function ml_up(evt) {
                divTop = d.style.pixelTop;
        }
        d.style.top = (divTop + increment) + 'px';
+
+       saved_y = y;
 }
 
 function CtdlResizeMsgListMouseDown(evt) {
        saved_y = (ns6 ? evt.clientY : event.clientY);
        document.onmouseup = ml_up;
+       document.onmousemove = ml_move;
        if (document.layers) {
-               document.captureEvents(Event.MOUSEUP);
+               document.captureEvents(Event.MOUSEUP | Event.MOUSEMOVE);
        }
 }