Commit c80a66e tamat
committed
1 parent 3bb18b7 commit c80a66e Copy full SHA for c80a66e
File tree 2 files changed +665
-621
lines changed
2 files changed +665
-621
lines changed Original file line number Diff line number Diff line change 3409
3409
3410
3410
if (LiteGraph.isValidConnection(output.type, input.type)) {
3411
3411
link_info = new LLink(
3412
- this.graph.last_link_id++ ,
3412
+ ++ this.graph.last_link_id,
3413
3413
input.type,
3414
3414
this.id,
3415
3415
slot,
@@ -11331,7 +11331,8 @@ if (typeof exports != "undefined") {
11331
11331
11332
11332
function DownloadData() {
11333
11333
this.size = [60, 30];
11334
- this.addInput("value", 0, { label: "" });
11334
+ this.addInput("data", 0 );
11335
+ this.addInput("download", LiteGraph.ACTION );
11335
11336
this.properties = { filename: "data.json" };
11336
11337
this.value = null;
11337
11338
var that = this;
@@ -11368,6 +11369,11 @@ if (typeof exports != "undefined") {
11368
11369
setTimeout( function(){ URL.revokeObjectURL( url ); }, 1000*60 ); //wait one minute to revoke url
11369
11370
}
11370
11371
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
+
11371
11377
DownloadData.prototype.onExecute = function() {
11372
11378
if (this.inputs[0]) {
11373
11379
this.value = this.getInputData(0);
You can’t perform that action at this time.
0 commit comments