If I comment the code I've added in dragstart, it works everywhere but in Safari. If I comment the code in MouseEvent._eventHandler() , and use only the one I've added in dragstart , it works fine everywhere.
So I don't know why. However, it seems more logical to have thes check which are drag specific in dragevent rather that in mouse_...
So I would say, let's comment out the code in MouseEvent._eventHandler() in favor of the one in dragevent. Run some tests to make sure.
The code you mention in mouse_ie.js is the block about the drag event or is it another one ?
Benoit
On Wednesday, March 12, 2003, at 06:51 PM, Raymond Irving wrote:
One other thing...
Have you looked at the mouseevent codes (mouse_xxxjs)? The MouseEvent._eventHandler() contains some codes that will prevent form elements from being dragged. Inside the mouse_ie.js file you'll also see a new piece of code that enables selection of text inside the textarea if the layer is drag-able.
So in that case we can either more the code from MouseEvent._eventHandler() to dragevent.js or remove the code from drag events. What do you think?
-- Raymond Irving
--- Benoit Marchant <[EMAIL PROTECTED]> wrote:');dynapi.library.include('dynapi.api');dynapi.library.include('dynapi.Well, I think it did before I modified the code. In dynapi2, there the following:
DynMouseEvent.EventMethod=function(e) { var dynobject=this.lyrobj; if(is.def) { if (is.ie) var e=dynobject.frame.event e.cancelBubble=true;
if (DynAPI.wasDragging && e.type=="click") { DynAPI.wasDragging=false; return false; } } ....
to avoid sending onclick after a dragend. We can re do the same, the wasDragging is still set in dragevent.js I can't think of a case where it would be bad to receive both. But if we need to do it, we know what to do !
So I'll go on and commit the changes.
Benoit
On Wednesday, March 12, 2003, at 01:36 PM, Raymond Irving wrote:
exeception
Yep! It works fine on my machine with theof one thing...a
The onclick event is been triggered at the end ofdrag. Is that by design?
-- Raymond Irving
--- Benoit Marchant <[EMAIL PROTECTED]> wrote:Thanks Raymond, that should fix the ondragend issue, but listeners would still receive an ondragstart and maybe an ondragmove. The only way I see to do it "right" would be to bring back the logic from dynapi2. I've brought back t he fix to be able to use form elements in draggable layers.
Here it is. Please test in on your machines
ATTACHMENT part 2 application/octet-streamx-unix-mode=0755; name=dragevent.js
--------------------------------- DynAPI Examples - Drag Eventdynapi.library.setPath('../src/
library');dynapi.library.include('dynapi.debug');dynapi.library.include
DynLayer(null,10,10,20,20,'red'))DragEvent.enableDragEvents(a);DragEven
('DragEvent');var p = dynapi.document.addChild(new DynLayer(null,50,90,200,200,'silver'))var a=p.addChild(new
e.type;}a.addEventListener(dragevents);dynapi.onLoad(function()
DynLayer(null,300,90,200,200,'silver'))p2.setHTML('t.setDragBoundary(a, {left:5, right:5, top:5, bottom:5});var p2 = dynapi.document.addChild(new
var[input] ');DragEvent.enableDragEvents(p2);var dragevents = {};dragevents.onclick = function(e) {o = e.getSource();document.frm.click.value ='';}dragevents.ondragstart ='onclick'; document.frm.dragstart.value = ''; document.frm.drag.value ='';}dragevents.ondragmove =function(e) { var o = e.getSource(); document.frm.dragstart.value = e.type; document.frm.click.value =dragevents.ondragend = function(e) { var o = e.getSource(); if(e.type == 'ondragend') document.frm.dragstart.value = ''; document.frm.drag.value =
-------------------------------------------------------'//p.setSize(200,200);\n';{ str = '// Try these tests:\n\n'+ 'p.setSize(150,350);\n'+dynapi.document.insertAllChildren();>dynapi.debug.setEvaluate(str);});Click: [input] Drag Start: [input] Drag: [input]we
if it's working fine, I'll commit to cvs.
Benoit
On Tuesday, March 11, 2003, at 08:39 PM, Raymond Irving wrote:
Notes my comments below:need
--- Benoit Marchant <[EMAIL PROTECTED]> wrote:Hi
I mentioned it before, but I'm pretty sure webothto address this. If you click on a layer that's dragable, you willbothget ondragend and onclick called. If you have an event handler onevents doing different things, you're screwed ! I believe, tell me if that's wrong, that the ondragend event should no be sent if just a click happens. To fix that,usedcanthateither add the test that was in dynapi2 for that reason, or do something else, maybe set a "dragmoved" flag in dragevent.onmousemoveI'vewe could check in dragevent on mouseup ?
See the attached file. I just did a quick fixed.not tested the file but it should work. I'vedrageda.wasDragged flag to check if the layer was
-- Raymond Irving
Benoit
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031enChallengeThis SF.net email is sponsored by:Cryptois now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://www.mail-archive.com/[EMAIL PROTECTED]/_______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED]
=== message truncated ===__________________________________________________
onlineonlineDo you Yahoo!? Yahoo! Web Hosting - establish your businesshttp://webhosting.yahoo.com<dragevent.zip>
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your businesshttp://webhosting.yahoo.com
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com
------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/