Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/gui
In directory usw-pr-cvs1:/tmp/cvs-serv8866/src/lib/dynapi/gui

Modified Files:
        scrollbar.js 
Log Message:
Hopefully the scrollbar and drag event work fine now. The .x and .y sttributes where 
incorrectly set in mouse.js. Also I added that force mouseUp to me where the mouseDown 
was. Disabled by default, set DynMouseEvent.forceUp to true if you want to enable it.

Index: scrollbar.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/scrollbar.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** scrollbar.js        2001/03/25 06:04:16     1.7
--- scrollbar.js        2001/03/26 15:41:38     1.8
***************
*** 44,50 ****
                if (knob.pathanim && knob.pathanim.playing) e.setBubble(false);
        };
        this.mouseEvents.onmousedown = function(e) {
!               var lyr = e.getSource();
!               var o = e.getTarget();
                if (!lyr.pathanim || !lyr.pathanim.playing) {
                        var newx = e.getX()-Math.ceil(o.knob.w/2);
--- 44,53 ----
                if (knob.pathanim && knob.pathanim.playing) e.setBubble(false);
        };
+       this.mouseEvents.onmousemove = function(e) {
+               window.status = e.getX()+" "+e.getY()
+       };
        this.mouseEvents.onmousedown = function(e) {
!               var lyr = e.getSource()
!               var o = e.getTarget()
                if (!lyr.pathanim || !lyr.pathanim.playing) {
                        var newx = e.getX()-Math.ceil(o.knob.w/2);
***************
*** 56,60 ****
                        if (newy<0) newy=0;
                        if (newy>=offH) newy=offH;
!                       
                        o.knob.slideTo(newx,newy);
                }
--- 59,63 ----
                        if (newy<0) newy=0;
                        if (newy>=offH) newy=offH;
!                                               
                        o.knob.slideTo(newx,newy);
                }
***************
*** 75,79 ****
                var lyr = e.getSource();
                var o = e.getTarget();
!               var evt = new MouseEvent();
                evt.bubble = false;
                evt.type = "mousedown";
--- 78,82 ----
                var lyr = e.getSource();
                var o = e.getTarget();
!               var evt = new DynMouseEvent();
                evt.bubble = false;
                evt.type = "mousedown";


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to