mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add oneditresize function definition
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user