From: vasary.daniel Date: Wed, 13 Apr 2022 15:22:02 +0000 (+0000) Subject: flowchart integrated X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=a26a823b5e63e42cabcaf02965315d2955d49fe7;p=mediacube.git flowchart integrated git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C33157 --- diff --git a/server/user.mediacube.gui/js/processVisualizer.js b/server/user.mediacube.gui/js/processVisualizer.js index e0630fe4..835bab85 100644 --- a/server/user.mediacube.gui/js/processVisualizer.js +++ b/server/user.mediacube.gui/js/processVisualizer.js @@ -1,4 +1,5 @@ +/* var defaultFlowchartData = { operators: { operator1: { @@ -40,14 +41,15 @@ var defaultFlowchartData = { }, } }; +*/ -var otherFlowchartData = { +var defaultFlowchartData = { operators: { operator1: { top: 20, left: 20, properties: { - title: 'Operator 3', + title: 'Operator 1', inputs: {}, outputs: { output_1: { @@ -56,49 +58,28 @@ var otherFlowchartData = { } } }, - operator2: { - top: 80, - left: 300, - properties: { - title: 'Operator 4', - 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 flowChartWidget = null; + $(document).ready(function() { var $flowchart = $('#flowchartworkspace'); // Apply the plugin on a standard, empty div... - var widget = $flowchart.flowchart({ + flowChartWidget = $flowchart.flowchart({ data: defaultFlowchartData, defaultSelectedLinkColor: '#000055', grid: 10, multipleLinksOnInput: true, multipleLinksOnOutput: true }); - - setTimeout(() => { - console.log("Changing data", widget.flowchart); - widget.flowchart("setData", otherFlowchartData); - - }, 500); }); +function setFlowchartData(data) { + console.log("Changing data", data); + //var x = {operators: { operator1 : { properties: { title: 'Operator X' } }}}; + flowChartWidget.flowchart("setData", data); +} + + diff --git a/server/user.mediacube.gui/pages/processVisualizer.zul b/server/user.mediacube.gui/pages/processVisualizer.zul index 81e29229..19977f28 100644 --- a/server/user.mediacube.gui/pages/processVisualizer.zul +++ b/server/user.mediacube.gui/pages/processVisualizer.zul @@ -4,9 +4,12 @@