CSS Added fill-mode for nodes
Amends based on Simons Comments
ESLinted The whole project
Topo2Link - Added Labels for PortA and PortB on mouseover
Updated breadcrumbs
Topo2.js - commented out a line causing error on panning
Topo2 Navigation between regions
Change-Id: I9cc0f4499ab68a14e246bba192f6528258471b35
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Model.js b/web/gui/src/main/webapp/app/view/topo2/topo2Model.js
index 20fb5e0..b1b2a12 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Model.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Model.js
@@ -42,7 +42,7 @@
return this.attributes[attr];
},
- set: function(key, val, options) {
+ set: function (key, val, options) {
if (!key) {
return this;
@@ -56,19 +56,21 @@
(attributes = {})[key] = val;
}
- options || (options = {});
+ var opts = options || (options = {});
- var unset = options.unset,
- silent = options.silent,
+ var unset = opts.unset,
+ silent = opts.silent,
changes = [],
- changing = this._changing;
+ changing = this._changing;
this._changing = true;
if (!changing) {
// NOTE: angular.copy causes issues in chrome
- this._previousAttributes = Object.create(Object.getPrototypeOf(this.attributes));
+ this._previousAttributes = Object.create(
+ Object.getPrototypeOf(this.attributes)
+ );
this.changed = {};
}
@@ -84,34 +86,38 @@
changes.push(index);
}
- if (!angular.equals(previous[index], val)) {
- changed[index] = val;
- } else {
+ if (angular.equals(previous[index], val)) {
delete changed[index];
+ } else {
+ changed[index] = val;
}
- unset ? delete current[index] : current[index] = val;
+ if (unset) {
+ delete current[index];
+ } else {
+ current[index] = val;
+ }
});
// Trigger all relevant attribute changes.
if (!silent) {
if (changes.length) {
- this._pending = options;
+ this._pending = opts;
}
for (var i = 0; i < changes.length; i++) {
- this.onChange(changes[i], this, current[changes[i]], options);
+ this.onChange(changes[i], this,
+ current[changes[i]], opts);
}
}
this._changing = false;
return this;
},
- toJSON: function(options) {
- return angular.copy(this.attributes)
- },
+ toJSON: function (options) {
+ return angular.copy(this.attributes);
+ }
};
-
Model.extend = function (protoProps, staticProps) {
var parent = this;
@@ -136,8 +142,7 @@
};
angular.module('ovTopo2')
- .factory('Topo2Model',
- [
+ .factory('Topo2Model', [
function () {
return Model;
}