From 10589967fcb46639c0757b92d143dff3620bc226 Mon Sep 17 00:00:00 2001 From: Sirbu Nicolae-Cezar Date: Wed, 28 Jul 2021 14:51:06 +0300 Subject: [PATCH 1/3] Extract nodeDistance on x, y coords to external properties Signed-off-by: Sirbu Nicolae-Cezar --- happi-graph.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/happi-graph.js b/happi-graph.js index b969ec3..3ea080e 100644 --- a/happi-graph.js +++ b/happi-graph.js @@ -93,6 +93,14 @@ class HappiGraph extends PolymerElement { nodeCountLimit: { type: Number, value: 0 + }, + nodeDistanceX: { + type: Number, + value: 350 + }, + nodeDistanceY: { + type: Number, + value: 350 } }; } @@ -256,8 +264,8 @@ class HappiGraph extends PolymerElement { improvedLayout: false, hierarchical: { enabled:true, - levelSeparation: 450, - nodeSpacing: 350, + levelSeparation: this.nodeDistanceY, + nodeSpacing: this.nodeDistanceX, treeSpacing: 200, direction: this.graphDirection === 'HORIZONTAL' ? 'LR' : 'DU', // UD, DU, LR, RL sortMethod: 'directed', // hubsize, directed @@ -311,8 +319,8 @@ class HappiGraph extends PolymerElement { id: "root", layoutOptions: { "elk.algorithm": "layered", - "elk.spacing.nodeNode": 200, - "elk.layered.spacing.baseValue": 150, + "elk.spacing.nodeNode": this.nodeDistanceY, + "elk.layered.spacing.baseValue": this.nodeDistanceX, "elk.direction": this.graphDirection === 'HORIZONTAL' ? 'RIGHT' : 'UP' }, children: [ From 85a72ebedfa9107a4666df8c9053f223d3c2a825 Mon Sep 17 00:00:00 2001 From: Sirbu Nicolae-Cezar Date: Fri, 30 Jul 2021 13:01:32 +0300 Subject: [PATCH 2/3] Update egeria-js-commons verison Signed-off-by: Sirbu Nicolae-Cezar --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed18836..bc080d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2259,8 +2259,8 @@ } }, "egeria-js-commons": { - "version": "git+https://github.com/odpi/egeria-js-commons.git#5d41cbd28f8e1877f8496498f97e917d0f5a9c10", - "from": "git+https://github.com/odpi/egeria-js-commons.git#v0.2.1", + "version": "git+https://github.com/odpi/egeria-js-commons.git#b2c1e0f70b1575e1d764c8f7ad8967a34fc480a1", + "from": "git+https://github.com/odpi/egeria-js-commons.git#3.0.0", "dev": true }, "electron-to-chromium": { diff --git a/package.json b/package.json index f7ec2fa..e256311 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@polymer/test-fixture": "^4.0.2", "@webcomponents/webcomponentsjs": "^2.0.0", "chai": "^4.2.0", - "egeria-js-commons": "git+https://github.com/odpi/egeria-js-commons#v0.2.1", + "egeria-js-commons": "git+https://github.com/odpi/egeria-js-commons#3.0.0", "jest": "^27.0.6", "mocha": "^6.1.4", "polymer-cli": "^1.9.11", From f02d2ae7b9d4bbe0f9f8a725e0371e36f42c4fc2 Mon Sep 17 00:00:00 2001 From: Sirbu Nicolae-Cezar Date: Fri, 30 Jul 2021 13:01:42 +0300 Subject: [PATCH 3/3] 3.0.0 Signed-off-by: Sirbu Nicolae-Cezar --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc080d9..1ef99e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "happi-graph", - "version": "2.11.0", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e256311..ce2c503 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "happi-graph", - "version": "2.11.0", + "version": "3.0.0", "description": "Happi Graph Web Component using Polymer 3.0", "main": "happi-graph.js", "scripts": {