EasyUI Forum
September 16, 2025, 04:04:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: layout problem  (Read 12002 times)
zolotoy
Jr. Member
**
Posts: 89


View Profile Email
« on: July 13, 2015, 08:23:23 AM »

I am trying to create the following layout:

--------------------
|          |           |
|          |           |
|          |           |
|          |           |
|          |---------|
|          |           |
|          |           |
--------------------

I want to resize it vertically and horizontally.

Here is my code:
Code:
<div easyui-layout class="easyui-layout" style="width:70%;height:80%;" fit="true">
        <div data-options="region:'west',title:'west',split:true" style="width:25%;">
        </div>
        <div easyui-layout class="easyui-layout" region="center" fit="true">
            <div data-options="region:'center',split:false"></div>
            <div data-options="region:'north',split:true" style="height:20%;"></div>
        </div>
    </div>   

And controller:
Code:
explorer.directive('easyuiLayout', function () {
    return {
        restrict: 'AE',
        link: function (scope, elem, attrs) {
            $(elem).layout();
        }
    }
});

It works at most part.
My problem is when resizing it vertically first will show the right edge of the layout. Screenshot is attached.

Thanks
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: July 13, 2015, 06:54:32 PM »

Please use the code below instead.
Code:
<div easyui-layout fit="true">
    <div data-options="region:'west',title:'west',split:true" style="width:25%;">
    </div>
    <div region="center">
        <div easyui-layout fit="true">
            <div data-options="region:'center'"></div>
            <div data-options="region:'north',split:true" style="height:20%;"></div>
        </div>
    </div>
</div>   
Logged
zolotoy
Jr. Member
**
Posts: 89


View Profile Email
« Reply #2 on: July 14, 2015, 12:13:01 AM »

That does not show anything.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #3 on: July 14, 2015, 01:26:40 AM »

Please look at this example http://jsfiddle.net/kq2omqko/. It works fine.
Logged
zolotoy
Jr. Member
**
Posts: 89


View Profile Email
« Reply #4 on: July 14, 2015, 06:17:15 AM »

Your example works perfectly, but trying it in my environment and it not is not showing anything. The only difference is that I have controller's code in the separate file.
Any idea?

Thanks
Logged
zolotoy
Jr. Member
**
Posts: 89


View Profile Email
« Reply #5 on: July 14, 2015, 06:23:27 AM »

Ok, adding the following style to the top div made it work:
<div easyui-layout fit="true" style="width:74%;height:80%;">
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!