Skip to content
This repository

Introduce local controls for non-time, non-time plots #83

Merged
merged 9 commits into from 7 months ago

2 participants

VWoeltjen harleigh
VWoeltjen
Collaborator

Introduce local controls for non-time non-time. This includes:

  • Pan & Zoom
  • Corner reset buttons (except top-right for time)
  • Purple arrows

Also, adds support for Semi-Fixed mode for non-time non-time plots (previously this was treated as Fixed mode in the absence of Purple Arrows)

harleigh harleigh commented on the diff
fastPlotViews/src/main/java/gov/nasa/arc/mct/fastplot/scatter/ScatterPlot.java
((8 lines not shown))
108 129
 	}
109 130
 	
  131
+	private void setupAxisBoundsManagers() {
  132
+		for (AbstractAxis axis : getAxes()) {
  133
+			AxisVisibleOrientation o = axis.getVisibleOrientation();
  134
+			if (o != null) {
  135
+				List<AbstractAxisBoundManager> bounds = new ArrayList<AbstractAxisBoundManager>(2);
2

I am not sure what the literal value, 2 represents

VWoeltjen Collaborator

2 = initial size of array (it is known at that point in the code that there will be exactly two bound managers, one for responding to minimum, and one for responding to maximum)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
harleigh harleigh commented on the diff
fastPlotViews/src/main/java/gov/nasa/arc/mct/fastplot/bridge/PlotterPlot.java
@@ -1414,5 +1418,30 @@ public void addDataSet(String lowerCase, Color plottingColor,
1414 1418
 			AbstractLegendEntry legend) {
1415 1419
 		// TODO Auto-generated method stub
1416 1420
 		
  1421
+	}
  1422
+
  1423
+	@Override
  1424
+	public void attachLocalControl(AbstractPlotLocalControl control) {
  1425
+		// TODO: Move attachment code for local controls here
1

Was this TODO to be implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
harleigh harleigh commented on the diff
fastPlotViews/src/main/java/gov/nasa/arc/mct/fastplot/bridge/PlotterPlot.java
@@ -1414,5 +1418,30 @@ public void addDataSet(String lowerCase, Color plottingColor,
1414 1418
 			AbstractLegendEntry legend) {
1415 1419
 		// TODO Auto-generated method stub
1416 1420
 		
  1421
+	}
  1422
+
  1423
+	@Override
  1424
+	public void attachLocalControl(AbstractPlotLocalControl control) {
  1425
+		// TODO: Move attachment code for local controls here
  1426
+	}
  1427
+
  1428
+	@Override
  1429
+	public Collection<AbstractAxis> getAxes() {
  1430
+		// TODO: PlotterPlot should use new API
1

Question on this TODO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
VWoeltjen
Collaborator

Regarding TODO items, I believe these are correctly labeled (these points have not yet been addressed but may be worth addressing in the future)

Some backstory:

  • Prior implementation of plot local controls (pan/zoom, purple arrows, etc) was fairly tightly-coupled to plots which have a visible time axis.
  • #36 remained incomplete due to the absence of these local controls in the non-time non-time version of plots
  • Pull request offers interfaces for a more generalized version of local controls that includes commonalities between time-based and non-time plots
  • Pull request implements these more general local controls for non-time plots

The "regular" plot (PlotterPlot, the time-based plot) does not yet utilize the new interfaces for dealing with these controls, instead retaining the tightly-coupled version of these controls. Rationale is to minimize code changes to time-based plots in the near-term. (Time-based plots are a heavily used feature of MCT, and existing controls for these are reasonably well-tested)

harleigh harleigh merged commit 0e81050 into from
harleigh harleigh closed this
VWoeltjen VWoeltjen referenced this pull request from a commit in VWoeltjen/mct
VWoeltjen [Tests] Merge test update with latest from master
Resolves conflicts from merging #83;
code added to same locations, non-overlapping
in terms of functionality.
b627661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.