2 Questions regarding LayoutManager

View: New views
7 Messages — Rating Filter:   Alert me  

2 Questions regarding LayoutManager

by Henning Jödden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody,

1) when I render an iframe into a "center" Unit of a Layout, then it
seems not possible to resize the other units "over" the iframe. So, do I
have to resize the iframe in the onResize handler of the layout to get
this working?

2) What exactly happens when "removeUnit()" is called? The Layout unit
is removed, but the container is still visible (including the "header"
string that I passed into  the "addUnit()" config)
So how do I completely remove a Layout Unit and all its contents or turn
it invisible?
A "display: none;" attached to the body-container after removing the
unit seems to be ignored, but this would not be my favorite "hack" anyway...

I made an example, where you can see what I mean, here:
http://phool.de/elaine/hejtest.php

just click on the two treenodes a few times. And do not mind the crappy
contents ...
I really "carved" this out of a larger application. ;-)

thanks a lot in advance
henning



Parent Message unknown Re: 2 Questions regarding LayoutManager

by dav.glass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Henning --

1: This is something I will have fixed in the 2.6.0 release, but for now you have to do some trickery with the DOM.
        Basically what is happening is that the document in the iframe is grabbing the events that Resize/DragDrop are using to control the element.
        You will need to detect when the resize starts and hide the iframe, then when it's over show it again..

2: removeUnit only removes the unit from the layout, it doesn't destroy the unit. Try the close method on the unit like this:

Change this line:
ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top' ) );

To this:
ELAINE.layout2.getUnitByPosition('top').close();


Does all that make sense?
Dav

 Dav Glass
dav.glass@...
blog.davglass.com




+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine  +



----- Original Message ----
From: Henning Jödden <henning.joedden@...>
To: YUI List <ydn-javascript@...>
Sent: Tuesday, April 29, 2008 7:57:08 AM
Subject: [ydn-javascript] 2 Questions regarding LayoutManager

Hello everybody,

1) when I render an iframe into a "center" Unit of a Layout, then it
seems not possible to resize the other units "over" the iframe. So, do
I have to resize the iframe in the onResize handler of the layout to
get this working?

2) What exactly happens when "removeUnit()" is called? The Layout unit
is removed, but the container is still visible (including the "header"
string that I passed into  the "addUnit()" config)
So how do I completely remove a Layout Unit and all its contents or
turn it invisible?
A "display: none;" attached to the body-container after removing the
unit seems to be ignored, but this would not be my favorite "hack" anyway...

I made an example, where you can see what I mean, here:
http://phool.de/elaine/hejtest.php

just click on the two treenodes a few times. And do not mind the crappy
contents ...
I really "carved" this out of a larger application. ;-)

thanks a lot in advance
henning


 

Re: 2 Questions regarding LayoutManager

by Henning Jödden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dav,

oh yes, that makes sense ;-)
That hint with the iframe was exactly what I was looking for.

The LayoutUnit.close() method works for the example now but not yet in
the "real"
application but that should be no big obstacle, now that I know how it
works.

thanks a lot for your help
Henning

Dav Glass schrieb:

>
> Henning --
>
> 1: This is something I will have fixed in the 2.6.0 release, but for
> now you have to do some trickery with the DOM.
> Basically what is happening is that the document in the iframe is
> grabbing the events that Resize/DragDrop are using to control the element.
> You will need to detect when the resize starts and hide the iframe,
> then when it's over show it again..
>
> 2: removeUnit only removes the unit from the layout, it doesn't
> destroy the unit. Try the close method on the unit like this:
>
> Change this line:
> ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top' ) );
>
> To this:
> ELAINE.layout2.getUnitByPosition('top').close();
>
> Does all that make sense?
> Dav
>
> Dav Glass
> dav.glass@... <mailto:dav.glass%40yahoo.com>
> blog.davglass.com
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine +
>
> ----- Original Message ----
> From: Henning Jödden <henning.joedden@...
> <mailto:henning.joedden%40artegic.de>>
> To: YUI List <ydn-javascript@...
> <mailto:ydn-javascript%40yahoogroups.com>>
> Sent: Tuesday, April 29, 2008 7:57:08 AM
> Subject: [ydn-javascript] 2 Questions regarding LayoutManager
>
> Hello everybody,
>
> 1) when I render an iframe into a "center" Unit of a Layout, then it
> seems not possible to resize the other units "over" the iframe. So, do
> I have to resize the iframe in the onResize handler of the layout to
> get this working?
>
> 2) What exactly happens when "removeUnit()" is called? The Layout unit
> is removed, but the container is still visible (including the "header"
> string that I passed into the "addUnit()" config)
> So how do I completely remove a Layout Unit and all its contents or
> turn it invisible?
> A "display: none;" attached to the body-container after removing the
> unit seems to be ignored, but this would not be my favorite "hack"
> anyway...
>
> I made an example, where you can see what I mean, here:
> http://phool.de/elaine/hejtest.php <http://phool.de/elaine/hejtest.php>
>
> just click on the two treenodes a few times. And do not mind the crappy
> contents ...
> I really "carved" this out of a larger application. ;-)
>
> thanks a lot in advance
> henning
>
>  

improve iframe resizing - Re: 2 Questions regarding LayoutManager

by Michel Corne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks to this post I managed to resize an iframe in the center
layout, see the code below. However, is there a way to leave the image
in the background with something not as drastic as "hidden" during the
resizing?

         var hide = function() {
            var el = new YAHOO.util.Element('url');
            el.setStyle('visibility', 'hidden');
            layout.on('mouseup', function(){
                el.setStyle('visibility', 'visible');
            })
        };
       
        layout.on('startResize', hide);

See http://mcworks.ovh.org/page_layout_source5.html .

Thanks,
MC

--- In ydn-javascript@..., Dav Glass <dav.glass@...> wrote:
>
> Henning --
>
> 1: This is something I will have fixed in the 2.6.0 release, but for
now you have to do some trickery with the DOM.
>         Basically what is happening is that the document in the
iframe is grabbing the events that Resize/DragDrop are using to
control the element.
>         You will need to detect when the resize starts and hide the
iframe, then when it's over show it again..
>
> 2: removeUnit only removes the unit from the layout, it doesn't
destroy the unit. Try the close method on the unit like this:

>
> Change this line:
> ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top' ) );
>
> To this:
> ELAINE.layout2.getUnitByPosition('top').close();
>
>
> Does all that make sense?
> Dav
>
>  Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine  +
>
>
>
> ----- Original Message ----
> From: Henning Jödden <henning.joedden@...>
> To: YUI List <ydn-javascript@...>
> Sent: Tuesday, April 29, 2008 7:57:08 AM
> Subject: [ydn-javascript] 2 Questions regarding LayoutManager
>
> Hello everybody,
>
> 1) when I render an iframe into a "center" Unit of a Layout, then it
> seems not possible to resize the other units "over" the iframe. So, do
> I have to resize the iframe in the onResize handler of the layout to
> get this working?
>
> 2) What exactly happens when "removeUnit()" is called? The Layout unit
> is removed, but the container is still visible (including the "header"
> string that I passed into  the "addUnit()" config)
> So how do I completely remove a Layout Unit and all its contents or
> turn it invisible?
> A "display: none;" attached to the body-container after removing the
> unit seems to be ignored, but this would not be my favorite "hack"
anyway...

>
> I made an example, where you can see what I mean, here:
> http://phool.de/elaine/hejtest.php
>
> just click on the two treenodes a few times. And do not mind the crappy
> contents ...
> I really "carved" this out of a larger application. ;-)
>
> thanks a lot in advance
> henning
>



Parent Message unknown Re: improve iframe resizing - Re: 2 Questions regarding LayoutManager

by dav.glass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michel --

This has been covered a couple of times, it's not really an issue with Layout Manager or Resize, it's roots are in DragDrop.

Here are a couple of threads with work arounds:
http://tech.groups.yahoo.com/group/ydn-javascript/message/29963
http://tech.groups.yahoo.com/group/ydn-javascript/message/30808

 Dav Glass
dav.glass@...
blog.davglass.com




+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine  +



----- Original Message ----
From: Michel Corne <mcorne@...>
To: ydn-javascript@...
Sent: Sunday, July 6, 2008 3:03:58 AM
Subject: [ydn-javascript] improve iframe resizing  - Re: 2 Questions regarding LayoutManager

Thanks to this post I managed to resize an iframe in the center
layout, see the code below. However, is there a way to leave the image
in the background with something not as drastic as "hidden" during the
resizing?

         var hide = function() {
            var el = new YAHOO.util.Element('url');
            el.setStyle('visibility', 'hidden');
            layout.on('mouseup', function(){
                el.setStyle('visibility', 'visible');
            })
        };
       
        layout.on('startResize', hide);

See http://mcworks.ovh.org/page_layout_source5.html .

Thanks,
MC

--- In ydn-javascript@..., Dav Glass <dav.glass@...> wrote:
>
> Henning --
>
> 1: This is something I will have fixed in the 2.6.0 release, but for
now you have to do some trickery with the DOM.
>         Basically what is happening is that the document in the
iframe is grabbing the events that Resize/DragDrop are using to
control the element.
>         You will need to detect when the resize starts and hide the
iframe, then when it's over show it again..
>
> 2: removeUnit only removes the unit from the layout, it doesn't
destroy the unit. Try the close method on the unit like this:

>
> Change this line:
> ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top' ) );
>
> To this:
> ELAINE.layout2.getUnitByPosition('top').close();
>
>
> Does all that make sense?
> Dav
>
>  Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine  +
>
>
>
> ----- Original Message ----
> From: Henning Jödden <henning.joedden@...>
> To: YUI List <ydn-javascript@...>
> Sent: Tuesday, April 29, 2008 7:57:08 AM
> Subject: [ydn-javascript] 2 Questions regarding LayoutManager
>
> Hello everybody,
>
> 1) when I render an iframe into a "center" Unit of a Layout, then it
> seems not possible to resize the other units "over" the iframe. So, do
> I have to resize the iframe in the onResize handler of the layout to
> get this working?
>
> 2) What exactly happens when "removeUnit()" is called? The Layout unit
> is removed, but the container is still visible (including the "header"
> string that I passed into  the "addUnit()" config)
> So how do I completely remove a Layout Unit and all its contents or
> turn it invisible?
> A "display: none;" attached to the body-container after removing the
> unit seems to be ignored, but this would not be my favorite "hack"
anyway...

>
> I made an example, where you can see what I mean, here:
> http://phool.de/elaine/hejtest.php
>
> just click on the two treenodes a few times. And do not mind the crappy
> contents ...
> I really "carved" this out of a larger application. ;-)
>
> thanks a lot in advance
> henning
>



------------------------------------

Yahoo! Groups Links




improve iframe resizing - Re: 2 Questions regarding LayoutManager

by Michel Corne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, Dav. Note that I did read both threads (and a few others)
before posting this message (this message is actually a Re to #29963
;-) Anyway, hiding the iframe works well enough for me. I was just
wondering if there was a way to still let it display in some ways
during the resizing, like in a "frozen" state but not "active" (not
sure I am making sense here). I also tried to cover the iframe as per
#30808 but did not manage to get it to work. Plus, the iframe would
still disappear, I guess.

MC

--- In ydn-javascript@..., Dav Glass <dav.glass@...> wrote:
>
> Michel --
>
> This has been covered a couple of times, it's not really an issue
with Layout Manager or Resize, it's roots are in DragDrop.

>
> Here are a couple of threads with work arounds:
> http://tech.groups.yahoo.com/group/ydn-javascript/message/29963
> http://tech.groups.yahoo.com/group/ydn-javascript/message/30808
>
>  Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine  +
>
>
>
> ----- Original Message ----
> From: Michel Corne <mcorne@...>
> To: ydn-javascript@...
> Sent: Sunday, July 6, 2008 3:03:58 AM
> Subject: [ydn-javascript] improve iframe resizing  - Re: 2 Questions
regarding LayoutManager

>
> Thanks to this post I managed to resize an iframe in the center
> layout, see the code below. However, is there a way to leave the image
> in the background with something not as drastic as "hidden" during the
> resizing?
>
>          var hide = function() {
>             var el = new YAHOO.util.Element('url');
>             el.setStyle('visibility', 'hidden');
>             layout.on('mouseup', function(){
>                 el.setStyle('visibility', 'visible');
>             })
>         };
>        
>         layout.on('startResize', hide);
>
> See http://mcworks.ovh.org/page_layout_source5.html .
>
> Thanks,
> MC
>
> --- In ydn-javascript@..., Dav Glass <dav.glass@> wrote:
> >
> > Henning --
> >
> > 1: This is something I will have fixed in the 2.6.0 release, but for
> now you have to do some trickery with the DOM.
> >         Basically what is happening is that the document in the
> iframe is grabbing the events that Resize/DragDrop are using to
> control the element.
> >         You will need to detect when the resize starts and hide the
> iframe, then when it's over show it again..
> >
> > 2: removeUnit only removes the unit from the layout, it doesn't
> destroy the unit. Try the close method on the unit like this:
> >
> > Change this line:
> > ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top'
) );

> >
> > To this:
> > ELAINE.layout2.getUnitByPosition('top').close();
> >
> >
> > Does all that make sense?
> > Dav
> >
> >  Dav Glass
> > dav.glass@
> > blog.davglass.com
> >
> >
> >
> >
> > + Windows: n. - The most successful computer virus, ever. +
> > + A computer without a Microsoft operating system is like a dog
> > without bricks tied to its head +
> > + A Microsoft Certified Systems Engineer is to computing what a
> > McDonalds Certified Food Specialist is to fine cuisine  +
> >
> >
> >
> > ----- Original Message ----
> > From: Henning Jödden <henning.joedden@>
> > To: YUI List <ydn-javascript@...>
> > Sent: Tuesday, April 29, 2008 7:57:08 AM
> > Subject: [ydn-javascript] 2 Questions regarding LayoutManager
> >
> > Hello everybody,
> >
> > 1) when I render an iframe into a "center" Unit of a Layout, then it
> > seems not possible to resize the other units "over" the iframe. So, do
> > I have to resize the iframe in the onResize handler of the layout to
> > get this working?
> >
> > 2) What exactly happens when "removeUnit()" is called? The Layout unit
> > is removed, but the container is still visible (including the "header"
> > string that I passed into  the "addUnit()" config)
> > So how do I completely remove a Layout Unit and all its contents or
> > turn it invisible?
> > A "display: none;" attached to the body-container after removing the
> > unit seems to be ignored, but this would not be my favorite "hack"
> anyway...
> >
> > I made an example, where you can see what I mean, here:
> > http://phool.de/elaine/hejtest.php
> >
> > just click on the two treenodes a few times. And do not mind the
crappy

> > contents ...
> > I really "carved" this out of a larger application. ;-)
> >
> > thanks a lot in advance
> > henning
> >
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>



Parent Message unknown Re: improve iframe resizing - Re: 2 Questions regarding LayoutManager

by dav.glass :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

MC --

Covering the iframe is the best way to handle it..

I should note, that I have fixed this issue in the upcoming 2.6.0 release..

Dav

 Dav Glass
dav.glass@...
blog.davglass.com




+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine  +



----- Original Message ----
From: Michel Corne <mcorne@...>
To: ydn-javascript@...
Sent: Sunday, July 6, 2008 9:51:24 AM
Subject: [ydn-javascript] improve iframe resizing  - Re: 2 Questions regarding LayoutManager

Thanks, Dav. Note that I did read both threads (and a few others)
before posting this message (this message is actually a Re to #29963
;-) Anyway, hiding the iframe works well enough for me. I was just
wondering if there was a way to still let it display in some ways
during the resizing, like in a "frozen" state but not "active" (not
sure I am making sense here). I also tried to cover the iframe as per
#30808 but did not manage to get it to work. Plus, the iframe would
still disappear, I guess.

MC

--- In ydn-javascript@..., Dav Glass <dav.glass@...> wrote:
>
> Michel --
>
> This has been covered a couple of times, it's not really an issue
with Layout Manager or Resize, it's roots are in DragDrop.

>
> Here are a couple of threads with work arounds:
> http://tech.groups.yahoo.com/group/ydn-javascript/message/29963
> http://tech.groups.yahoo.com/group/ydn-javascript/message/30808
>
>  Dav Glass
> dav.glass@...
> blog.davglass.com
>
>
>
>
> + Windows: n. - The most successful computer virus, ever. +
> + A computer without a Microsoft operating system is like a dog
> without bricks tied to its head +
> + A Microsoft Certified Systems Engineer is to computing what a
> McDonalds Certified Food Specialist is to fine cuisine  +
>
>
>
> ----- Original Message ----
> From: Michel Corne <mcorne@...>
> To: ydn-javascript@...
> Sent: Sunday, July 6, 2008 3:03:58 AM
> Subject: [ydn-javascript] improve iframe resizing  - Re: 2 Questions
regarding LayoutManager

>
> Thanks to this post I managed to resize an iframe in the center
> layout, see the code below. However, is there a way to leave the image
> in the background with something not as drastic as "hidden" during the
> resizing?
>
>          var hide = function() {
>             var el = new YAHOO.util.Element('url');
>             el.setStyle('visibility', 'hidden');
>             layout.on('mouseup', function(){
>                 el.setStyle('visibility', 'visible');
>             })
>         };
>        
>         layout.on('startResize', hide);
>
> See http://mcworks.ovh.org/page_layout_source5.html .
>
> Thanks,
> MC
>
> --- In ydn-javascript@..., Dav Glass <dav.glass@> wrote:
> >
> > Henning --
> >
> > 1: This is something I will have fixed in the 2.6.0 release, but for
> now you have to do some trickery with the DOM.
> >         Basically what is happening is that the document in the
> iframe is grabbing the events that Resize/DragDrop are using to
> control the element.
> >         You will need to detect when the resize starts and hide the
> iframe, then when it's over show it again..
> >
> > 2: removeUnit only removes the unit from the layout, it doesn't
> destroy the unit. Try the close method on the unit like this:
> >
> > Change this line:
> > ELAINE.layout2.removeUnit( ELAINE.layout2.getUnitByPosition( 'top'
) );

> >
> > To this:
> > ELAINE.layout2.getUnitByPosition('top').close();
> >
> >
> > Does all that make sense?
> > Dav
> >
> >  Dav Glass
> > dav.glass@
> > blog.davglass.com
> >
> >
> >
> >
> > + Windows: n. - The most successful computer virus, ever. +
> > + A computer without a Microsoft operating system is like a dog
> > without bricks tied to its head +
> > + A Microsoft Certified Systems Engineer is to computing what a
> > McDonalds Certified Food Specialist is to fine cuisine  +
> >
> >
> >
> > ----- Original Message ----
> > From: Henning Jödden <henning.joedden@>
> > To: YUI List <ydn-javascript@...>
> > Sent: Tuesday, April 29, 2008 7:57:08 AM
> > Subject: [ydn-javascript] 2 Questions regarding LayoutManager
> >
> > Hello everybody,
> >
> > 1) when I render an iframe into a "center" Unit of a Layout, then it
> > seems not possible to resize the other units "over" the iframe. So, do
> > I have to resize the iframe in the onResize handler of the layout to
> > get this working?
> >
> > 2) What exactly happens when "removeUnit()" is called? The Layout unit
> > is removed, but the container is still visible (including the "header"
> > string that I passed into  the "addUnit()" config)
> > So how do I completely remove a Layout Unit and all its contents or
> > turn it invisible?
> > A "display: none;" attached to the body-container after removing the
> > unit seems to be ignored, but this would not be my favorite "hack"
> anyway...
> >
> > I made an example, where you can see what I mean, here:
> > http://phool.de/elaine/hejtest.php
> >
> > just click on the two treenodes a few times. And do not mind the
crappy

> > contents ...
> > I really "carved" this out of a larger application. ;-)
> >
> > thanks a lot in advance
> > henning
> >
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>



------------------------------------

Yahoo! Groups Links



LightInTheBox - Buy quality products at wholesale price