Skip to content

Commit d752cff

Browse files
authored
Merge pull request #362 from TextDB/jimmy-fixed-join
[Issue #246] [GUI] Added dynamic sub-connectors and multiple links on output
2 parents 414d4d9 + fbd811b commit d752cff

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

‎textdb/textdb-gui/js/onstart.js‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ var setup = function(){
1111

1212
// Apply the plugin on a standard, empty div...
1313
$('#the-flowchart').flowchart({
14-
data: data
14+
data: data,
15+
multipleLinksOnOutput: true
1516
});
1617

1718
var operatorI = 0;
@@ -381,12 +382,12 @@ var setup = function(){
381382
title: (operatorName),
382383
inputs: {
383384
input_1: {
384-
label: 'Input 1',
385+
label: 'Input (:i)',
385386
}
386387
},
387388
outputs: {
388389
output_1: {
389-
label: 'Output 1',
390+
label: 'Output (:i)',
390391
}
391392
},
392393
attributes: {
@@ -402,6 +403,10 @@ var setup = function(){
402403
operatorData.properties.attributes['attributes'] = userAttributes;
403404
operatorData.properties.attributes['limit'] = userLimit;
404405
operatorData.properties.attributes['offset'] = userOffset;
406+
407+
if(operatorName == "Join"){
408+
operatorData.properties.inputs['input_2'] = {label: 'Input 2'};
409+
}
405410

406411
operatorI++;
407412

@@ -444,12 +449,12 @@ var setup = function(){
444449
title: (operatorName),
445450
inputs: {
446451
input_1: {
447-
label: 'Input 1',
452+
label: 'Input (:i)',
448453
}
449454
},
450455
outputs: {
451456
output_1: {
452-
label: 'Output 1',
457+
label: 'Output (:i)',
453458
}
454459
},
455460
attributes: {
@@ -466,10 +471,10 @@ var setup = function(){
466471
result = DEFAULT_DICT;
467472
}
468473
operatorData.properties.attributes[attr] = result;
469-
}
470-
471-
$('#the-flowchart').flowchart('deleteSelected');
472-
$('#the-flowchart').flowchart('createOperator', operatorId, operatorData);
474+
}
475+
476+
$('#the-flowchart').flowchart('setOperatorData', operatorId, operatorData);
477+
473478
$('#the-flowchart').flowchart('selectOperator', operatorId);
474479
selectedOperator = $('#the-flowchart').flowchart('getSelectedOperatorId');
475480

0 commit comments

Comments
 (0)