EasyUI Forum
September 14, 2025, 03:40:12 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: Bug when add cls in region center of layout  (Read 11049 times)
omhardb
Newbie
*
Posts: 11


View Profile Email
« on: June 17, 2015, 09:36:02 AM »

If you try to add a class in the region center of a layout, the panel don't put in the correct place. It seems that is in the bottom of the window.

You can check this issue in the following link: http://jsfiddle.net/omhardb/yLwd4kvn/

Maybe the problem is because the "layout-panel" and "layout-panel-center" classes are losing when you add a new class in the region center.

Please check this problem and give a solution as soon as posible.

Regards,
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: June 18, 2015, 12:32:47 AM »

To solve this issue, please override the $.fn.layout.parsePanelOptions function.
Code:
<script type="text/javascript">
$.fn.layout.parsePanelOptions = function(target){
var t = $(target);
var opts = $.extend({}, $.fn.panel.parseOptions(target),
$.parser.parseOptions(target, [
'region',{split:'boolean',collpasedSize:'number',minWidth:'number',minHeight:'number',maxWidth:'number',maxHeight:'number'}
]));
var dir = opts.region || 'center';
return $.extend({}, opts, {
cls: ('layout-panel layout-panel-'+dir+' '+(opts.cls||'')),
bodyCls: ('layout-body '+(opts.bodyCls||''))
});
};
</script>

The updated example is available from http://jsfiddle.net/yLwd4kvn/1/.
Logged
omhardb
Newbie
*
Posts: 11


View Profile Email
« Reply #2 on: June 18, 2015, 01:17:20 PM »

Thanks for the solution Grin

Are you planning to include this solution in the next version?
« Last Edit: June 18, 2015, 01:30:39 PM by omhardb » Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #3 on: June 18, 2015, 11:46:59 PM »

Yes, this solution will be integrated into next version 1.4.3.
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!