Patches item #424582, was opened at 2001-05-16 09:09
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=424582&group_id=5757
Category: DynAPI 2 Event
Group: None
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Michael Pemberton (mpember)
Assigned to: Richard Bennett (richard_bennett)
Summary: dragBoundary patch
Initial Comment:
I found that there was a problem with the drag boundry when the layer has a dynamic
width /
height.
Because the lyr.w / lyr.h values were set as null, the boundry was not working
properly.
To this end, I have included the attached version of dragevent.js
You will find that there are two changes being made:
60 if (lyr.h==null) { lyr.DragHFix=true; lyr.h=lyr.getContentHeight(); };
61 if (lyr.w==null) { lyr.DragWFix=true; lyr.w=lyr.getContentWidth(); };
128 if (lyr.DragHFix) { delete lyr.DragHFix; lyr.h=null; };
129 if (lyr.DragWFix) { delete lyr.DragWFix; lyr.w=null; };
These lines calculate the layer size when the drag starts so that the boundary is
correct. It then
resets the width / heigh values to null when the drag ends.
----------------------------------------------------------------------
Comment By: Richard Bennett (richard_bennett)
Date: 2001-11-01 09:20
Message:
Logged In: YES
user_id=164855
Hi,
I tried a few things, and it seems to me the current API
already works as it should.
Maybe this had already been fixed.
I added a dragable dynamicly sized layer to the
dragexample, and it seems to work ok, see:
<wrap>
http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/~checkout~/dynapi/dynapi/examples/dynapi.eve
nt.dragevent.html?rev=1.2&content-type=text/html
</wrap>
----------------------------------------------------------------------
Comment By: Michael Pemberton (mpember)
Date: 2001-10-30 16:14
Message:
Logged In: YES
user_id=172719
The changes suggested by mattfair are not required.
The code I submitted makes the changes when dragging starts / ends. This means that
the move events in
between are automatically corrected. This means that the getContentXXX calls are only
made once per
drag. The overhead is too great to be calling it each time the mouse moves.
----------------------------------------------------------------------
Comment By: Matt Fair (mattfair)
Date: 2001-10-30 13:53
Message:
Logged In: YES
user_id=55151
in dragevent.js, when mousemove change to:
var w=lyr.w||lyr.getContentWidth();
var h=lyr.h||lyr.getContentHeight();
the '||getContentWidth()' or '||getContentHeight()' will put
in if the width or height is 0 or null.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=424582&group_id=5757
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/