You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2018/07/25 12:35:12 UTC

qpid-dispatch git commit: DISPATCH-1071 Correct use of 'this' in callback function.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master b76a43f24 -> ef4776e28


DISPATCH-1071 Correct use of 'this' in callback function.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/ef4776e2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/ef4776e2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/ef4776e2

Branch: refs/heads/master
Commit: ef4776e28499c09f40bb2b4c3be99075bf547d2f
Parents: b76a43f
Author: Ernest Allen <ea...@redhat.com>
Authored: Wed Jul 25 08:34:57 2018 -0400
Committer: Ernest Allen <ea...@redhat.com>
Committed: Wed Jul 25 08:34:57 2018 -0400

----------------------------------------------------------------------
 console/stand-alone/plugin/js/topology/traffic.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/ef4776e2/console/stand-alone/plugin/js/topology/traffic.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/topology/traffic.js b/console/stand-alone/plugin/js/topology/traffic.js
index bf22e58..10f263f 100644
--- a/console/stand-alone/plugin/js/topology/traffic.js
+++ b/console/stand-alone/plugin/js/topology/traffic.js
@@ -209,7 +209,7 @@ class Dots extends TrafficAnimation {
     this.excludedAddresses = localStorage[CHORDFILTERKEY] ? JSON.parse(localStorage[CHORDFILTERKEY]) : [];
     this.radius = radius; // the radius of a router circle
     this.lastFlows = {}; // the number of dots animated between routers
-    this.stopped = true;
+    this.stopped = false;
     this.chordData = new ChordData(this.traffic.QDRService, true, converter); // gets ingressHistogram data
     this.chordData.setFilter(this.excludedAddresses);
     traffic.$scope.addresses = {};
@@ -362,15 +362,16 @@ class Dots extends TrafficAnimation {
   }
   // animate the d3 selection (flow) along the given path
   animateFlow(flow, path, count, back, rate) {
-    let self = this;
     let l = path.node().getTotalLength();
     flow.transition()
       .ease('easeLinear')
       .duration(l * 10 / rate)
-      .attrTween('transform', self.translateDots(self.radius, path, count, back))
-      .each('end', function () { if (this.stopped === false) {
-        self.animateFlow(flow, path, count, back, rate); 
-      }});
+      .attrTween('transform', this.translateDots(this.radius, path, count, back))
+      .each('end', () => {
+        if (this.stopped === false) {
+          this.animateFlow(flow, path, count, back, rate);
+        }
+      });
   }
   // create dots along the path between routers
   startAnimation(path, id, hop, rate) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org