EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Max Lamda on October 12, 2017, 03:02:42 AM



Title: Event in Layout that is called, when Layout resizes [SOLVED]
Post by: Max Lamda on October 12, 2017, 03:02:42 AM
Is there any event for a layout that is called, if the user resizes the page? Did not find such in the documentation.

I only need this in one particular part of the dom because it contains Highcharts and that has to be redrawn then.

Just to be clear: The events from "resize" do not work.





Title: Re: Event in Layout that is called, when Layout resizes
Post by: stworthy on October 12, 2017, 06:05:14 PM
The layout region panel extends from panel component. You can bind the 'onResize' event on a region panel. Please try this code:
Code:
<div class="easyui-layout" style="width:100%;height:350px;">
<div data-options="region:'west',split:true" title="West" style="width:100px;"></div>
<div data-options="region:'center',title:'Main Title',onResize:onResize">

</div>
</div>
<script type="text/javascript">
function onResize(width,height){
console.log(width)
}
</script>


Title: Re: Event in Layout that is called, when Layout resizes
Post by: Max Lamda on November 02, 2017, 03:00:46 AM
Ok, thanks a lot.

The region was it, not the layout itself.