Topo2: Fixed incorrect link highlighting and port locations
JIRA Tasks; ONOS-6276

Change-Id: Id9affd2cdc1bfa335654111655a413abad63ffc7
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
index 4897052..d3f449c 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
@@ -211,6 +211,28 @@
                 this.set('enhanced', false);
                 d3.select('.topo2-portLabels').selectAll('.portLabel').remove();
             },
+            setPosition: function () {
+                this.set({
+                    position: {
+                        x1: this.get('source').x,
+                        y1: this.get('source').y,
+                        x2: this.get('target').x,
+                        y2: this.get('target').y
+                    }
+                });
+
+                if (this.get('enhanced')) {
+                    this.updatePortPosition();
+                }
+            },
+            updatePortPosition: function () {
+                var sourcePos = this.locatePortLabel(1),
+                    targetPos = this.locatePortLabel();
+                d3.select('#topo2-port-src')
+                    .attr('transform', sus.translate(sourcePos.x, sourcePos.y));
+                d3.select('#topo2-port-tgt')
+                    .attr('transform', sus.translate(targetPos.x, targetPos.y));
+            },
             getSelected: function () {
                 return this.collection.filter(function (m) {
                     return m.get('selected');