Hi Raymond,

Thanks for your help.  The initial display problem is now fixed.  The
example URL has been updated.

The "shift one block to cover extra space" is actually quite easy.  Just
delete the moved block from its parent, then the other remaining blocks
will be automatically shifted by the browser.

However, there are still quite a number of problems with dragging and
aligning.

I want to design it so that when a block is dragged to the other side,
it is removed from it's parent, then become child of the other big DIV. 
This way, theorectically, the browser should handle the aligning
automatically since the block is set to display:inline and
position:relative.

It looks like the layer is losing its position:relative property after
being deleted from its parent and added to the new parent.
In the example URL, the upper left corner has two blocks illustrating
such problem.  The "1" is created by insertChild, and the "a" is created
by inline layer.  Also, both have incorrect drag boundaries.  The
boundary is supposed to be the light gray big box, but somehow the
bottom is not bounded.

One more weird problem, when I drag the "a" block, the browser (IE6)
keeps trying to load an image file called "none", which doesn't exist.

Jack

-- 
Jack Chung <[EMAIL PROTECTED]>
http://www.PerceptiveCorner.com/


On Mon, 7 Jul 2003 06:26:50 -0700 (PDT)
Raymond Irving <[EMAIL PROTECTED]> wrote:

> Hi Jack,
> 
> After lookoing at your example (
> http://www.perceptivecorner.com/layer2.html) page I
> found a few problems:
> 
> Please see below:
> 
> --- Jack Chung <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > I have a hard time figuring out how to make layers
> > display as inline.  I
> > use Dynapi 3.0 beta and noticed the insertChild
> > function can create
> > relative positioned layers.  But I was not able to
> > find any way to set
> > the display=inline property.
> 
> Firstly the insertChild() function is only available
> on the dynapi.document object. You should use
> dynapi.document.insertChild(lyr1,'relative') instead
> of mylayer.insertChild(lyr1,'relative').
> 
> The lyr1 object in your example is created after the
> page loads and therefore will not be inserted into the
> document. This layer (lyr1) must be created before the
> page loads. Any code found within your init function
> will be executed after the page loads.
>  
> > I tried
> > layer.css.display = 'inline';
> > or
> > layer.elm.style.display = 'inline';
> > but both are useless.
> 
> The css property of the layers are only available
> after page load.
> 
> dynapi.onLoad(function(){
>    layer.css.display = 'inline'; 
>    // this should work. Note some browsers might have
>    // problems with the css display inline property
> })
>  
> > Also tried to use inline layer, which displayed
> > well, but becomes buggy
> > when I setDragBoundary.  The boundary should be the
> > parent of the layer
> > (another layer), but it *seems* to become
> > "document", but offset by
> > about 20 pixel to the lower right.
> 
> This I think is due to the fact that your (lyr1 &
> lyr2) layers are create after the has been page
> loaded. To insert lyr1 & lyr2 into the document they
> must be created before the page loads
>  
> > I have two big DIVs on my page (left and right),
> > inside each DIV, there
> > are many small same-sized DIVs (inline and
> > relative).  I want to be able
> > to drag one of the small DIVs from the big DIV, then
> > drop into the other
> > big DIV.  Then the small DIV will be aligned
> > automatically in the new
> > big DIV (by using inline and relative).  Also, all
> > small DIVs in the
> > original big DIV should shift one block to cover the
> > extra space left
> > after the small DIV is dragged away.
> > 
> > Can someone help me?
> 
> Please see the following drag-drop examples
> 
> examples/demo.dragdrop-collision.html
> examples/demo.dragover.html
> 
> As for shifting "one block to cover the extra space
> left after the small DIV is dragged away" you'll have
> to implement a reflow function or library. There isn't
> any reflow library available for dynapi as yet, but I
> do hope someone will be able to contribute such a
> library.
> 
> PS. To send replies to the group use the
> "Reply-To-All" button.
> 
> Best regards,
> 
> 
> --
> Raymond Irving
> 
> > Thanks in advance.
> > 
> > Jack
> > 
> > -- 
> > Jack Chung <[EMAIL PROTECTED]>
> > http://www.PerceptiveCorner.com/
> > 
> > 
> > 
> >
> -------------------------------------------------------
> > This SF.Net email sponsored by: Free pre-built
> > ASP.NET sites including
> > Data Reports, E-commerce, Portals, and Forums are
> > available now.
> > Download today and enter to win an XBOX or Visual
> > Studio .NET.
> >
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dynapi-help



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to