Skip to content

Commit c80a66e

Browse files
author
tamat
committed
build
1 parent 3bb18b7 commit c80a66e

File tree

2 files changed

+665
-621
lines changed

2 files changed

+665
-621
lines changed

build/litegraph.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -3409,7 +3409,7 @@
34093409

34103410
if (LiteGraph.isValidConnection(output.type, input.type)) {
34113411
link_info = new LLink(
3412-
this.graph.last_link_id++,
3412+
++this.graph.last_link_id,
34133413
input.type,
34143414
this.id,
34153415
slot,
@@ -11331,7 +11331,8 @@ if (typeof exports != "undefined") {
1133111331

1133211332
function DownloadData() {
1133311333
this.size = [60, 30];
11334-
this.addInput("value", 0, { label: "" });
11334+
this.addInput("data", 0 );
11335+
this.addInput("download", LiteGraph.ACTION );
1133511336
this.properties = { filename: "data.json" };
1133611337
this.value = null;
1133711338
var that = this;
@@ -11368,6 +11369,11 @@ if (typeof exports != "undefined") {
1136811369
setTimeout( function(){ URL.revokeObjectURL( url ); }, 1000*60 ); //wait one minute to revoke url
1136911370
}
1137011371

11372+
DownloadData.prototype.onAction = function(action, param) {
11373+
var that = this;
11374+
setTimeout( function(){ that.downloadAsFile(); }, 100); //deferred to avoid blocking the renderer with the popup
11375+
}
11376+
1137111377
DownloadData.prototype.onExecute = function() {
1137211378
if (this.inputs[0]) {
1137311379
this.value = this.getInputData(0);

0 commit comments

Comments
 (0)