cleanup datagenerator editor instance

This commit is contained in:
Dave Conway-Jones 2017-06-24 12:17:18 +01:00
parent 1c30807be8
commit a64d758e18
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
2 changed files with 8 additions and 3 deletions

View File

@ -79,13 +79,18 @@
this.editor.focus();
},
oneditsave: function() {
$("#node-input-template").val(this.editor.getValue())
$("#node-input-template").val(this.editor.getValue());
this.editor.destroy();
delete this.editor;
},
oneditcancel: function() {
this.editor.destroy();
delete this.editor;
},
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var height = $("#dialog-form").height();
for (var i=0;i<rows.size();i++) {
for (var i=0; i<rows.size(); i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-text-editor-row");

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-data-generator",
"version" : "0.0.3",
"version" : "0.0.4",
"description" : "A Node-RED node to create a string of dummy data values from a template. Useful for test-cases.",
"dependencies" : {
"dummy-json": "1.0.*"