开发者

how to resize Omnigrid on Panel Resize in Mootools

开发者 https://www.devze.com 2023-02-16 20:17 出处:网络
I am working on a project where I am using Mootools + MochaUI + Omnigrid to display data. I have a page which contains two (MochaUI) panels and each panel contains Omnigrid to display data. I have a

I am working on a project where I am using Mootools + MochaUI + Omnigrid to display data.

I have a page which contains two (MochaUI) panels and each panel contains Omnigrid to display data. I have a requirement where when I use the panel handler to resize the 开发者_Python百科panel the omnigrid height must change accordingly.

Please let me know how to implement this. Thanks in advance.

Nizam


Pass the new height (it's in some callback or just calculate it with el.getSize().y) of a MochaUI panel to OmniGrid, like:

var omnigridCont = document.id('mygrid');
omnigridCont.setStyle('height', 'auto');
omnigridCont.getElement('.bDiv').setStyle('height', heightFromMochaUI);

Try poking around with it on JsFiddle.net, can't be that difficult.

0

精彩评论

暂无评论...
验证码 换一张
取 消