At the beginning, I created a component with resizer configuration
PHP Code:
var newPortlet = new Ext.create('Portals.view.portal.PortletContainer', {
// renderTo: me.body,
// floating:true,
id: portlet.id,
title: moduleCfg.title,
x: snapBox.x,
y: snapBox.y,
icon: moduleCfg.icon,
moduleClass: moduleClass,
minWidth:moduleSize[0],
minHeight: moduleSize[1],
maxWidth: grid.width,
maxHeight: grid.height,
width: moduleSize[0],
height: moduleSize[1],
resizable: {
handles: 's e se',
widthIncrement: grid.gridW,
heightIncrement: grid.gridH - 2,
transparent: true,
pinned: true
}
});
After resize window, I try to reconfig resizer's widthIncrement and heightIncrement with new value,
I try the following approach:
PHP Code:
module.resizable.widthIncrement = newWidth; // not work
module.resizer.widthIncrement = newWidth ; // not work
module.resizable.heightIncrement = newWidth; // not work
module.resizer.resizeTracker.widthIncrement = newWidth ; // not work
I tried to re-create resizer with new configuration, it doesn't work, it always try to use the old widthIncrement value.
PHP Code:
module.resizer.destroy();
delete module.resizer;
module.resizer.destory();
module.resizer = new Ext.create('Ext.resizer.Resizer',
{
target: module.id,
handles: 's e se',
widthIncrement: newWidth,
heightIncrement: newHeight,
transparent: true,
pinned: true,
dynamic:true
});
Can you help me to re-config resizer's widthIncrement dynamically?
Thanks in advance.