From: Art Cancro Date: Tue, 8 Nov 2005 05:44:50 +0000 (+0000) Subject: * Now it resizes on mousemove instead of mouseup. Very nice animated effect. X-Git-Tag: v7.86~4471 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ac6ad146e930f8bdc5841a583b18b23ad9662322;p=citadel.git * Now it resizes on mousemove instead of mouseup. Very nice animated effect. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 82fc2efda..2efb0aff7 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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. diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 63fcd7452..960ad4227 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -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); } }