Update plugin window resizing.
This commit is contained in:
parent
bf5a237993
commit
4d9125372f
|
@ -136,8 +136,6 @@ define([
|
||||||
variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize'));
|
variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize'));
|
||||||
variation.set_Buttons(itemVar.get('buttons'));
|
variation.set_Buttons(itemVar.get('buttons'));
|
||||||
variation.set_Size(itemVar.get('size'));
|
variation.set_Size(itemVar.get('size'));
|
||||||
variation.set_MaximumSize(itemVar.get('maximumSize'));
|
|
||||||
variation.set_MinimumSize(itemVar.get('minimumSize'));
|
|
||||||
variationsArr.push(variation);
|
variationsArr.push(variation);
|
||||||
});
|
});
|
||||||
plugin.set_Variations(variationsArr);
|
plugin.set_Variations(variationsArr);
|
||||||
|
@ -226,9 +224,7 @@ define([
|
||||||
var me = this,
|
var me = this,
|
||||||
arrBtns = variation.get_Buttons(),
|
arrBtns = variation.get_Buttons(),
|
||||||
newBtns = {},
|
newBtns = {},
|
||||||
size = variation.get_Size(),
|
size = variation.get_Size();
|
||||||
maxsize = variation.get_MaximumSize(),
|
|
||||||
minsize = variation.get_MinimumSize();
|
|
||||||
if (!size || size.length<2) size = [800, 600];
|
if (!size || size.length<2) size = [800, 600];
|
||||||
|
|
||||||
if (_.isArray(arrBtns)) {
|
if (_.isArray(arrBtns)) {
|
||||||
|
@ -244,11 +240,7 @@ define([
|
||||||
height: size[1], // inner height
|
height: size[1], // inner height
|
||||||
url: _baseUrl + variation.get_Url(),
|
url: _baseUrl + variation.get_Url(),
|
||||||
buttons: newBtns,
|
buttons: newBtns,
|
||||||
toolcallback: _.bind(this.onToolClose, this),
|
toolcallback: _.bind(this.onToolClose, this)
|
||||||
maxwidth: maxsize[0],
|
|
||||||
maxheight: maxsize[1],
|
|
||||||
minwidth: minsize[0],
|
|
||||||
minheight: minsize[1]
|
|
||||||
});
|
});
|
||||||
me.pluginDlg.on('render:after', function(obj){
|
me.pluginDlg.on('render:after', function(obj){
|
||||||
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
|
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
|
||||||
|
@ -275,9 +267,11 @@ define([
|
||||||
this.panelPlugins.closeNotVisualMode();
|
this.panelPlugins.closeNotVisualMode();
|
||||||
},
|
},
|
||||||
|
|
||||||
onPluginResize: function(width, height, callback) {
|
onPluginResize: function(size, minSize, maxSize, callback ) {
|
||||||
if (this.pluginDlg) {
|
if (this.pluginDlg) {
|
||||||
this.pluginDlg.setInnerSize(width, height);
|
var resizable = (minSize && minSize.length>1 && maxSize && maxSize.length>1 && (maxSize[0] > minSize[0] || maxSize[1] > minSize[1] || maxSize[0]==0 || maxSize[1] == 0));
|
||||||
|
this.pluginDlg.setResizable(resizable, minSize, maxSize);
|
||||||
|
this.pluginDlg.setInnerSize(size[0], size[1]);
|
||||||
if (callback)
|
if (callback)
|
||||||
callback.call();
|
callback.call();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,9 +64,7 @@ define([
|
||||||
initData: "",
|
initData: "",
|
||||||
isUpdateOleOnResize: false,
|
isUpdateOleOnResize: false,
|
||||||
buttons: [],
|
buttons: [],
|
||||||
size: [800, 600],
|
size: [800, 600]
|
||||||
maximumSize: [],
|
|
||||||
minimumSize: []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1727,9 +1727,7 @@ define([
|
||||||
initData: itemVar.initData,
|
initData: itemVar.initData,
|
||||||
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
||||||
buttons: itemVar.buttons,
|
buttons: itemVar.buttons,
|
||||||
size: itemVar.size,
|
size: itemVar.size
|
||||||
minimumSize: itemVar.minimumSize,
|
|
||||||
maximumSize: itemVar.maximumSize
|
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
if (variationsArr.length>0)
|
if (variationsArr.length>0)
|
||||||
|
|
|
@ -1513,9 +1513,7 @@ define([
|
||||||
initData: itemVar.initData,
|
initData: itemVar.initData,
|
||||||
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
||||||
buttons: itemVar.buttons,
|
buttons: itemVar.buttons,
|
||||||
size: itemVar.size,
|
size: itemVar.size
|
||||||
minimumSize: itemVar.minimumSize,
|
|
||||||
maximumSize: itemVar.maximumSize
|
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
if (variationsArr.length>0)
|
if (variationsArr.length>0)
|
||||||
|
|
|
@ -1722,9 +1722,7 @@ define([
|
||||||
initData: itemVar.initData,
|
initData: itemVar.initData,
|
||||||
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
|
||||||
buttons: itemVar.buttons,
|
buttons: itemVar.buttons,
|
||||||
size: itemVar.size,
|
size: itemVar.size
|
||||||
minimumSize: itemVar.minimumSize,
|
|
||||||
maximumSize: itemVar.maximumSize
|
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
if (variationsArr.length>0)
|
if (variationsArr.length>0)
|
||||||
|
|
Loading…
Reference in a new issue