This commit is contained in:
tamat
2019-08-16 21:15:43 +02:00
parent 3bb18b7a1a
commit c80a66eb8a
2 changed files with 665 additions and 621 deletions

View File

@@ -3409,7 +3409,7 @@
if (LiteGraph.isValidConnection(output.type, input.type)) {
link_info = new LLink(
this.graph.last_link_id++,
++this.graph.last_link_id,
input.type,
this.id,
slot,
@@ -11331,7 +11331,8 @@ if (typeof exports != "undefined") {
function DownloadData() {
this.size = [60, 30];
this.addInput("value", 0, { label: "" });
this.addInput("data", 0 );
this.addInput("download", LiteGraph.ACTION );
this.properties = { filename: "data.json" };
this.value = null;
var that = this;
@@ -11368,6 +11369,11 @@ if (typeof exports != "undefined") {
setTimeout( function(){ URL.revokeObjectURL( url ); }, 1000*60 ); //wait one minute to revoke url
}
DownloadData.prototype.onAction = function(action, param) {
var that = this;
setTimeout( function(){ that.downloadAsFile(); }, 100); //deferred to avoid blocking the renderer with the popup
}
DownloadData.prototype.onExecute = function() {
if (this.inputs[0]) {
this.value = this.getInputData(0);

1276
build/litegraph.min.js vendored

File diff suppressed because it is too large Load Diff