I have an improvement to dragevent.js.
by adding two lines of code, IE does no longer select text while
dragging (which in my opinion is really annoying)

the trick is to use IE's document.body.onselectstart Event-Handler

the changes i made to dragevent.js are the following:
--------------------------------------------------------------
[ ... ]
DragEvent.lyrListener.onmousedown=function(e) {
    [ ... ]
    lyr.dragevent=new DragEvent("dragstart",lyr);

    // disables text selection
    if (is.ie) lyr.doc.body.onselectstart = function() { return false }

    DynAPI.document.dragevent=lyr.dragevent;
    DynAPI.document.dragobject=lyr;
    [ ... ]
};
[ ... ]
DragEvent.docListener.onmouseup=function(e) {
    [ ... ]
    if (!lyr) return;

    // re-enables text-selection
    if (is.ie) lyr.doc.body.onselectstart = null

    if (lyr.parent.DragDrop) lyr.parent.DragDrop(lyr);
    [ ... ]
};
[ ... ]
--------------------------------------------------------------
maybe this should be better done by using the 'dragstart' and 'dragend'
Events!??

bye.
Michael Buerge


oh! i forgot:

there's a mini-bug in the list-example (dynapi.gui.list.html), the order
of the includes of the api-files is wrong:
it is
DynAPI.include('dynapi.api.dynlayer')
DynAPI.include('dynapi.api.browser')
..
which causes an error while parsing dynlayer.js, where of course the
is-object doesnt yet exist

reverse the order and it will rock again!


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev

Reply via email to