From: Sweidan Omar Date: Mon, 25 Apr 2022 08:18:49 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=5d0bd91b5da211e072dc845553e02e15b7722bc3;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C33197 --- diff --git a/server/user.mediacube.gui/js/processVisualizer2.js b/server/user.mediacube.gui/js/processVisualizer2.js new file mode 100644 index 00000000..5f425974 --- /dev/null +++ b/server/user.mediacube.gui/js/processVisualizer2.js @@ -0,0 +1,88 @@ + +var defaultFlowchartData = { + operators: { + operator1: { + top: 20, + left: 20, + properties: { + title: 'Operator 1', + extrastyle: "mctype-blue", + inputs: {}, + outputs: { + output_1: { + label: 'Output 1', + } + } + } + }, + operator2: { + top: 80, + left: 300, + properties: { + title: 'Operator 2', + extrastyle: "mctype-green", + inputs: { + input_1: { + label: 'Input 1', + }, + input_2: { + label: 'Input 2', + }, + }, + outputs: {} + } + }, + }, + links: { + link_1: { + fromOperator: 'operator1', + fromConnector: 'output_1', + toOperator: 'operator2', + toConnector: 'input_2', + }, + } +}; + +/* + +var defaultFlowchartData = { + operators: { + operator1: { + top: 20, + left: 20, + properties: { + title: 'Operator 1', + inputs: {}, + extrastyle: "mctype-blue", + outputs: { + output_1: { + label: 'Output 1', + } + } + } + } + } +}; +*/ +var flowChartWidget = null; + +$(document).ready(function() { + var $flowchart = $('#flowchartworkspace2'); + console.log($flowchart.flowchart); + + flowChartWidget = $flowchart.flowchart({ + data: defaultFlowchartData, + defaultSelectedLinkColor: '#000055', + grid: 10, + multipleLinksOnInput: true, + multipleLinksOnOutput: true + }); +}); + +function setFlowchartData(data) { + console.log("Changing data", data); + //var x = {operators: { operator1 : { properties: { title: 'Operator X' } }}}; + flowChartWidget.flowchart("setData", data); +} + +