From e30eed4fbc053e4f79918c040db15c91282e9f9e Mon Sep 17 00:00:00 2001 From: Aditya Bharadwaj Date: Sat, 3 Mar 2018 20:36:51 -0500 Subject: [PATCH 01/16] Create PULL_REQUEST_TEMPLATE.md Adding a pull request template to standardize the description of the proposed changes from contributors. Project contributors will automatically see the template's contents in the pull request body. More details can be found [here](https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/). --- PULL_REQUEST_TEMPLATE.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..9de17e17 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## Purpose +_Describe the problem or feature in addition to a link to the issues._ + +Example: +Fixes # . + +## Approach +_How does this change address the problem?_ + +#### Open Questions and Pre-Merge TODOs +- [ ] Use github checklists. When solved, check the box and explain the answer. + +## Learning +_Describe the research stage_ + +_Links to blog posts, patterns, libraries or addons used to solve this problem_ + +#### Blog Posts +- [How to Pull Request](https://github.com/flexyford/pull-request) Github Repo with Learning focused Pull Request Template. + From fb9e65ba9ef511d58e7452024a996124f857700f Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Tue, 22 May 2018 04:35:13 -0400 Subject: [PATCH 02/16] Update footer.html --- templates/partials/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/partials/footer.html b/templates/partials/footer.html index ba2a5a3f..1fa6fb54 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -1,4 +1,4 @@ \ No newline at end of file +
Cytoscape.js 3.2.12 + From f521238599f56d3744fa0332045b206292abd8db Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Tue, 22 May 2018 04:39:06 -0400 Subject: [PATCH 03/16] Update Cytoscape.js --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 7b986c01..1883d79d 100644 --- a/bower.json +++ b/bower.json @@ -21,7 +21,7 @@ "moment": "^2.17.0", "remarkable-bootstrap-notify": "^3.1.3", "animate.css": "^3.5.2", - "cytoscape": "^2.7.11", + "cytoscape": "^3.2.12", "webcola": "^3.3.0", "bootstrap": "^3.3.7", "cytoscape-cola": "^1.6.0", From b677d8a80fd21f69d0e72327e2cdcbb33a1d2d39 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Tue, 22 May 2018 04:40:12 -0400 Subject: [PATCH 04/16] Update Cytoscape.js --- templates/graphs/error.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/graphs/error.html b/templates/graphs/error.html index 95eac32a..e9447ad1 100644 --- a/templates/graphs/error.html +++ b/templates/graphs/error.html @@ -18,6 +18,6 @@

{{ Error | safe}}

-{% endblock %} \ No newline at end of file +{% endblock %} From aecd16f1131ac30880dc15af433612fbe3e2320e Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Tue, 22 May 2018 04:41:50 -0400 Subject: [PATCH 05/16] Update Cytoscape.js --- templates/graphs/reset.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/graphs/reset.html b/templates/graphs/reset.html index 75eacc14..7f415d78 100644 --- a/templates/graphs/reset.html +++ b/templates/graphs/reset.html @@ -48,6 +48,6 @@ -{% endblock %} \ No newline at end of file +{% endblock %} From 160754ab6bcb31f2c46ffbf56cb37dab60953caf Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Tue, 22 May 2018 04:44:43 -0400 Subject: [PATCH 06/16] Update Cytoscape.js --- templates/groups/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/groups/index.html b/templates/groups/index.html index d5caf179..f13fedda 100644 --- a/templates/groups/index.html +++ b/templates/groups/index.html @@ -43,7 +43,7 @@ From 86ac3cc09a863269ceafe3f3bc5cf770c656adb7 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Mon, 22 Oct 2018 20:51:34 -0400 Subject: [PATCH 07/16] Update bower.json --- bower.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 1883d79d..37f1dbbc 100644 --- a/bower.json +++ b/bower.json @@ -21,7 +21,7 @@ "moment": "^2.17.0", "remarkable-bootstrap-notify": "^3.1.3", "animate.css": "^3.5.2", - "cytoscape": "^3.2.12", + "cytoscape": "^3.2.17", "webcola": "^3.3.0", "bootstrap": "^3.3.7", "cytoscape-cola": "^1.6.0", @@ -30,7 +30,7 @@ "bootstrap-table": "^1.11.0", "cytoscape-panzoom": "^2.4.0", "select2": "select2-dist#^4.0.3", - "cytoscape-context-menus": "^2.1.1", + "cytoscape-context-menus": "^3.0.6", "bootstrap-colorpicker": "^2.5.1" } } From da615cfff706e2b68a2e81647bbb27b6ed6aacce Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Thu, 25 Oct 2018 23:54:55 -0400 Subject: [PATCH 08/16] Update error.html --- templates/graphs/error.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/graphs/error.html b/templates/graphs/error.html index e9447ad1..00b83808 100644 --- a/templates/graphs/error.html +++ b/templates/graphs/error.html @@ -18,6 +18,6 @@

{{ Error | safe}}

{% endblock %} From 9ca7c5bc97e2f63c8446484bcc62bcd70c896603 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Thu, 25 Oct 2018 23:56:44 -0400 Subject: [PATCH 09/16] Update reset.html --- templates/graphs/reset.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/graphs/reset.html b/templates/graphs/reset.html index 7f415d78..2c098a16 100644 --- a/templates/graphs/reset.html +++ b/templates/graphs/reset.html @@ -48,6 +48,6 @@ {% endblock %} From 121afa222739350c92b03b3d5027dd83d000dfbc Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Thu, 25 Oct 2018 23:57:44 -0400 Subject: [PATCH 10/16] Update index.html --- templates/groups/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/groups/index.html b/templates/groups/index.html index f13fedda..15312f19 100644 --- a/templates/groups/index.html +++ b/templates/groups/index.html @@ -43,7 +43,7 @@ From 3c65527b10c25413dff18fcb6784ec5c7d23cdb1 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Thu, 25 Oct 2018 23:58:08 -0400 Subject: [PATCH 11/16] Update footer.html --- templates/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 1fa6fb54..f24d2c06 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -1,4 +1,4 @@ From 4aba07832d6da02ba91d5517fa97fc30a1f569fa Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Fri, 26 Oct 2018 15:53:39 -0400 Subject: [PATCH 12/16] Fix issue 396 -- select layout algorithm does not work for upgraded cytoscape.js version 3.2.17 (#2) Fixes #396. Refer: https://github.com/cytoscape/cytoscape.js/issues/1533 --- static/js/graphs_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/graphs_page.js b/static/js/graphs_page.js index a7f4c57a..1cc4162c 100644 --- a/static/js/graphs_page.js +++ b/static/js/graphs_page.js @@ -601,7 +601,7 @@ var graphPage = { }); layoutID.positions = corrected_positions; } - graphPage.cyGraph.layout(layoutID); + graphPage.cyGraph.layout(layoutID).run(); }, saveLayout: function (layoutName, modalNameId) { From 51bbcbc948a11d25950a3aab684d379b37ba4e3c Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Fri, 26 Oct 2018 16:22:59 -0400 Subject: [PATCH 13/16] Fix issue 398 (#3) -- Edit selected nodes or edges function --- static/js/graphs_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/graphs_page.js b/static/js/graphs_page.js index 1cc4162c..a08f689b 100644 --- a/static/js/graphs_page.js +++ b/static/js/graphs_page.js @@ -1489,7 +1489,7 @@ var graphPage = { } }); - graphPage.cyGraph.elements().on('select, unselect', function () { + graphPage.cyGraph.elements().on('select unselect', function () { if (graphPage.cyGraph.nodes(':selected').length > 0) { $('#editSelectedNodesBtn').removeClass('disabled'); } else { From 470e846622fe1dd68f2b5a085c0b6a2b8cf6b3a8 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Fri, 26 Oct 2018 16:31:28 -0400 Subject: [PATCH 14/16] Fix issue 402 (#4) -- cyTarget to Target --- static/js/graphs_page.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/graphs_page.js b/static/js/graphs_page.js index a08f689b..2f67b4c0 100644 --- a/static/js/graphs_page.js +++ b/static/js/graphs_page.js @@ -2784,7 +2784,7 @@ var cytoscapeGraph = { fit: false, avoidOverlap: false, padding: 0 - }); + }).run(); } else if (layout_name === "fill_circle") { collection.layout( { @@ -2792,7 +2792,7 @@ var cytoscapeGraph = { fit: false, avoidOverlap: false, padding: 40 - }); + }).run(); } else if (layout_name === "grid") { collection.layout( { @@ -2800,7 +2800,7 @@ var cytoscapeGraph = { fit: false, avoidOverlap: true, condense: true - }); + }).run(); } else if (layout_name === "square") { cytoscapeGraph.runSquareLayoutOnCollection(cy, collection); } else if (layout_name === "horizontal") { From 985d8342369bec89d140e399699e99de3c0f499c Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Fri, 26 Oct 2018 16:33:28 -0400 Subject: [PATCH 15/16] Fix issue 400 (#5) -- cyTarget to Target --- static/js/graphs_page.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/js/graphs_page.js b/static/js/graphs_page.js index 2f67b4c0..0415e45e 100644 --- a/static/js/graphs_page.js +++ b/static/js/graphs_page.js @@ -870,7 +870,7 @@ var graphPage = { }, onTapGraphElement: function (evt) { // get target - var target = evt.cyTarget; + var target = evt.Target; // target some element other than background (node/edge) if (target !== this) { var popup = target._private.data.popup; @@ -1386,7 +1386,7 @@ var graphPage = { graphPage.cyGraph.on('free', function (e) { - var selected_elements = e.cyTarget.length > 1 ? graphPage.cyGraph.elements(':selected') : e.cyTarget; + var selected_elements = e.Target.length > 1 ? graphPage.cyGraph.elements(':selected') : e.Target; graphPage.layoutEditor.undoRedoManager.update({ 'action_type': 'move_node', 'data': { @@ -2443,7 +2443,7 @@ var cytoscapeGraph = { title: 'edit selected nodes', selector: 'node', onClickFunction: function (event) { - graphPage.layoutEditor.nodeEditor.open(cy.collection(cy.elements(':selected')).add(event.cyTarget).select()); + graphPage.layoutEditor.nodeEditor.open(cy.collection(cy.elements(':selected')).add(event.Target).select()); }, hasTrailingDivider: true }, @@ -2453,7 +2453,7 @@ var cytoscapeGraph = { selector: 'node', show: true, onClickFunction: function (event) { - selectAllOfTheSameType(event.cyTarget); + selectAllOfTheSameType(event.Target); } }, { @@ -2462,7 +2462,7 @@ var cytoscapeGraph = { selector: 'node', show: true, onClickFunction: function (event) { - unselectAllOfTheSameType(event.cyTarget); + unselectAllOfTheSameType(event.Target); } }, { @@ -2471,7 +2471,7 @@ var cytoscapeGraph = { selector: 'edge', show: true, onClickFunction: function (event) { - selectAllOfTheSameType(event.cyTarget); + selectAllOfTheSameType(event.Target); } }, { @@ -2480,7 +2480,7 @@ var cytoscapeGraph = { selector: 'edge', show: true, onClickFunction: function (event) { - unselectAllOfTheSameType(event.cyTarget); + unselectAllOfTheSameType(event.Target); } } ] From 5cdfe078cc9d34e3ca8c9e1eb6fa79ae26737ce6 Mon Sep 17 00:00:00 2001 From: JingVT <33851894+JingVT@users.noreply.github.com> Date: Fri, 26 Oct 2018 16:35:54 -0400 Subject: [PATCH 16/16] Fix issue 405 (#6) -- Remove applyMax funstions --- static/js/graphs_page.js | 74 ---------------------------------------- 1 file changed, 74 deletions(-) diff --git a/static/js/graphs_page.js b/static/js/graphs_page.js index 0415e45e..bcc3178a 100644 --- a/static/js/graphs_page.js +++ b/static/js/graphs_page.js @@ -1969,43 +1969,6 @@ var graphPage = { } return largestK; }, - applyMax: function (graph_layout) { - //Gets all nodes and edges up do the max value set - //and only renders them - var maxVal = parseInt($("#input_max").val()); - - if (!maxVal) { - return; - } - var newJSON = { - "nodes": new Array(), - "edges": new Array() - }; - - // List of node ids that should remain in the graph - var nodeNames = Array(); - - //Get all edges that meet the max quantifier - for (var i = 0; i < graph_json.elements['edges'].length; i++) { - var edge_data = graph_json.elements['edges'][i]; - if (edge_data['data']['k'] <= maxVal) { - newJSON['edges'].push(edge_data); - nodeNames.push(edge_data['data']['source']); - nodeNames.push(edge_data['data']['target']); - } - } - - //Get all nodes that meet the max quantifier - for (var i = 0; i < graph_json.elements['nodes'].length; i++) { - var node_data = graph_json.elements['nodes'][i]; - if (nodeNames.indexOf(node_data['data']['id']) > -1) { - newJSON['nodes'].push(node_data); - } - } - - graphPage.cyGraph.load(newJSON); - graphPage.filterNodesEdges.showOnlyK(); - }, showOnlyK: function () { // Returns all the id's that are > k value if ($("#input_k").val()) { @@ -2338,43 +2301,6 @@ var graphPage = { max: 50 }); }, - applyMax: function (graph_layout) { - //Gets all nodes and edges up do the max value set - //and only renders them - var maxVal = parseInt($("#input_max").val()); - - if (!maxVal) { - return; - } - var newJSON = { - "nodes": new Array(), - "edges": new Array() - }; - - // List of node ids that should remain in the graph - var nodeNames = Array(); - - //Get all edges that meet the max quantifier - for (var i = 0; i < graph_json.elements['edges'].length; i++) { - var edge_data = graph_json.elements['edges'][i]; - if (edge_data['data']['k'] <= maxVal) { - newJSON['edges'].push(edge_data); - nodeNames.push(edge_data['data']['source']); - nodeNames.push(edge_data['data']['target']); - } - } - - //Get all nodes that meet the max quantifier - for (var i = 0; i < graph_json.elements['nodes'].length; i++) { - var node_data = graph_json.elements['nodes'][i]; - if (nodeNames.indexOf(node_data['data']['id']) > -1) { - newJSON['nodes'].push(node_data); - } - } - - graphPage.cyGraph.load(newJSON); - graphPage.filterNodesEdges.showOnlyK(); - }, setBarToValueEdgeLength: function (inputId, barId) { /** * If the user enters a value greater than the max value allowed, change value of bar to max allowed value.