From 1b7fc57d21f5fbf4a73208743aaf3e484fb535fe Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 25 Jul 2016 16:55:27 -0400 Subject: [PATCH] Added status support to plots --- .../src/ConductorRepresenter.js | 8 +++++++- platform/features/plot/res/templates/plot.html | 2 +- platform/features/plot/src/PlotController.js | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/platform/features/conductor-v2-compatibility/src/ConductorRepresenter.js b/platform/features/conductor-v2-compatibility/src/ConductorRepresenter.js index 973a0e8ba4f..fb91a6b4e06 100644 --- a/platform/features/conductor-v2-compatibility/src/ConductorRepresenter.js +++ b/platform/features/conductor-v2-compatibility/src/ConductorRepresenter.js @@ -35,6 +35,7 @@ define( this.boundsListener = this.boundsListener.bind(this); this.timeSystemListener = this.timeSystemListener.bind(this); + this.followListener = this.followListener.bind(this); } ConductorRepresenter.prototype.boundsListener = function (bounds) { @@ -51,7 +52,11 @@ define( start: bounds.start, end: bounds.end, domain: timeSystem.metadata.key - }); + }, this.conductor.follow()); + }; + + ConductorRepresenter.prototype.followListener = function () { + this.boundsListener(this.conductor.bounds()); }; // Handle a specific representation of a specific domain object @@ -61,6 +66,7 @@ define( this.conductor.on("bounds", this.boundsListener); this.conductor.on("timeSystem", this.timeSystemListener); + this.conductor.on("follow", this.followListener) } }; diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html index 12680c2b277..008f410f4d7 100644 --- a/platform/features/plot/res/templates/plot.html +++ b/platform/features/plot/res/templates/plot.html @@ -82,7 +82,7 @@ ng-mousemove="subplot.hover($event)" mct-drag="subplot.continueDrag($event)" mct-drag-down="subplot.startDrag($event)" - mct-drag-up="subplot.endDrag($event); plot.update()"> + mct-drag-up="subplot.endDrag($event); plot.update();">