Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels for LAGs between nodes now aligned with each link #53

Merged
merged 11 commits into from
May 21, 2023
Prev Previous commit
Next Next commit
moved sourceView/targetView to parent GraphiteLink
  • Loading branch information
bortok committed May 20, 2023
commit 53ad80d4f6eee20a2db99c34b22cfb54963a2f78
60 changes: 28 additions & 32 deletions app/js/nextui.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,34 @@
*/
nx.define('GraphiteLink', nx.graphic.Topology.Link, {
properties: {
sourceView: {
/**
* Get or set the source view
* @property sourceView
*/
get: function () {
return this.view('source');
},
set: function (value) {
if (value !== undefined && this._sourceView !== value) {
this.view('source', value);
}
}
},
targetView: {
/**
* Get or set the source view
* @property targetView
*/
get: function () {
return this.view('target');
},
set: function (value) {
if (value !== undefined && this.targetView !== value) {
this.view('target', value);
}
}
},
sourceName: {
get: function() {
return this.model().get("srcIfName");
Expand Down Expand Up @@ -660,38 +688,6 @@
*/
nx.define('LinkWithAlignedLabels', GraphiteLink, {
properties: {
sourceView: {
/**
* Get or set the source view
* @property sourceView
* @type {GraphiteAlignedLabel}
* @default null
*/
get: function () {
return this.view('source');
},
set: function (value) {
if (value !== undefined && this._sourceView !== value) {
this.view('source', value);
}
}
},
targetView: {
/**
* Get or set the source view
* @property targetView
* @type {GraphiteAlignedLabel}
* @default null
*/
get: function () {
return this.view('target');
},
set: function (value) {
if (value !== undefined && this.targetView !== value) {
this.view('target', value);
}
}
}
},
view: function(view) {
view.content.push({
Expand Down