Skip to content

Commit

Permalink
Merge pull request #362 from TextDB/jimmy-fixed-join
Browse files Browse the repository at this point in the history
[Issue #246] [GUI] Added dynamic sub-connectors and multiple links on output
  • Loading branch information
zuozhiw authored Jan 23, 2017
2 parents 414d4d9 + fbd811b commit d752cff
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions textdb/textdb-gui/js/onstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ var setup = function(){

// Apply the plugin on a standard, empty div...
$('#the-flowchart').flowchart({
data: data
data: data,
multipleLinksOnOutput: true
});

var operatorI = 0;
Expand Down Expand Up @@ -381,12 +382,12 @@ var setup = function(){
title: (operatorName),
inputs: {
input_1: {
label: 'Input 1',
label: 'Input (:i)',
}
},
outputs: {
output_1: {
label: 'Output 1',
label: 'Output (:i)',
}
},
attributes: {
Expand All @@ -402,6 +403,10 @@ var setup = function(){
operatorData.properties.attributes['attributes'] = userAttributes;
operatorData.properties.attributes['limit'] = userLimit;
operatorData.properties.attributes['offset'] = userOffset;

if(operatorName == "Join"){
operatorData.properties.inputs['input_2'] = {label: 'Input 2'};
}

operatorI++;

Expand Down Expand Up @@ -444,12 +449,12 @@ var setup = function(){
title: (operatorName),
inputs: {
input_1: {
label: 'Input 1',
label: 'Input (:i)',
}
},
outputs: {
output_1: {
label: 'Output 1',
label: 'Output (:i)',
}
},
attributes: {
Expand All @@ -466,10 +471,10 @@ var setup = function(){
result = DEFAULT_DICT;
}
operatorData.properties.attributes[attr] = result;
}
$('#the-flowchart').flowchart('deleteSelected');
$('#the-flowchart').flowchart('createOperator', operatorId, operatorData);
}
$('#the-flowchart').flowchart('setOperatorData', operatorId, operatorData);

$('#the-flowchart').flowchart('selectOperator', operatorId);
selectedOperator = $('#the-flowchart').flowchart('getSelectedOperatorId');

Expand Down

0 comments on commit d752cff

Please sign in to comment.