JavaScript È°¿ëÆÁ
2010.09.20 / 21:48

[Ext JS] A Viewport always occupies the whole window area

¸Þ¸®¾ß½º
Ãßõ ¼ö 237
Á¦¸ñ¾øÀ½

viewport·Î ·¹À̾ƿô(layout)À» Àâ¾Ò´Âµ¥, ¾Æ¹«¸® Çصµ renderTo: Ext.get(¡®main-content¡¯) °¡ ¸ÔÁú ¾Ê¾Ò´Ù. main-content´Â ¾Æ·¡¿Í °°ÀÌ µû·Î ¸¸µé¾î µÐ °ø°£ÀÌ´Ù.

 

<body>

<div id='container' style="position: relative; width: 900px; top: 24px; left: 64px; font-size: 11px">
    <div id='main-content'></div>
</div>

</body>

 

¾Ë°í ³ª¸é, °£´ÜÇÑ °Çµ¥µµ, ²Ï Çì¸Ì´Ù. °á·ÐÀº? viewport¸¦ »ç¿ëÇÒ °æ¿ì¿¡´Â, renderTo ·Î ƯÁ¤ ¿µ¿ª¿¡ °¡µÑ ¼ö ¾ø´Ù.

 

http://www.yui-ext.com/forum/showthread.php?t=77446

Viewport automatically renders to the body, fits the browser viewport and maintains size when the window is resized.
Why don't you give the Viewport a layout - border would probably suit you, then add your custom div to the north region and the TabPanel to the center region.


A Viewport always occupies the whole window area.
But how are you hoping that the Viewport (Which you have noticed is a Container) is going to layout and possibly size any items you place in it?

 

¸¸¾à, ·¹À̾ƿôÀ» ¸¸µé°í, ±×°É ƯÁ¤ ¿µ¿ª¿¡ °¡µÎ°í ½ÍÀ¸¸é, Viewport ´ë½Å PanelÀ» ¾²¸é µÈ´Ù.

 

http://extjs.net/forum/showthread.php?p=222063#post222063

 

region : ¡®west¡¯, ¡®east¡¯, ¡®north¡¯, ¡®south¡¯, ¡®center¡¯ ´Â viewport¿¡¼­¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Â °Ô ¾Æ´Ï¾ú´Ù.