EasyUI Forum
April 24, 2024, 09:54:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Event in Layout that is called, when Layout resizes [SOLVED]  (Read 3430 times)
Max Lamda
Newbie
*
Posts: 48


View Profile
« 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.



« Last Edit: November 02, 2017, 03:01:16 AM by Max Lamda » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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>
Logged
Max Lamda
Newbie
*
Posts: 48


View Profile
« Reply #2 on: November 02, 2017, 03:00:46 AM »

Ok, thanks a lot.

The region was it, not the layout itself.

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!