Add oneditresize function definition

This commit is contained in:
Nick O'Leary
2016-01-04 16:53:32 +00:00
parent aed89d82fb
commit 2e9d445d36
8 changed files with 115 additions and 204 deletions

View File

@@ -348,6 +348,10 @@ RED.editor = (function() {
resize: function(e,ui) {
if (editing_node) {
$(this).dialog('option',"sizeCache-"+editing_node.type,ui.size);
if (editing_node._def.oneditresize) {
var form = $("#dialog-form");
editing_node._def.oneditresize.call(editing_node,{width:form.width(),height:form.height()});
}
}
},
open: function(e) {
@@ -364,6 +368,12 @@ RED.editor = (function() {
$(this).dialog('option','width',size.width);
$(this).dialog('option','height',size.height);
}
if (editing_node._def.oneditresize) {
setTimeout(function() {
var form = $("#dialog-form");
editing_node._def.oneditresize.call(editing_node,{width:form.width(),height:form.height()});
},0);
}
}
},
close: function(e) {