summaryrefslogtreecommitdiff
path: root/grapher/Models/Options/ActiveValueLabelXY.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-08 01:09:19 -0700
committerJacob Palecki <[email protected]>2020-09-08 01:09:19 -0700
commit254a66eda9d9f6add21937b3570d29f64af4ab1e (patch)
tree5d5a7995ae14d9aba924024a1694c5d1760634c6 /grapher/Models/Options/ActiveValueLabelXY.cs
parentAlignment for whole mode works (diff)
downloadrawaccel-254a66eda9d9f6add21937b3570d29f64af4ab1e.tar.xz
rawaccel-254a66eda9d9f6add21937b3570d29f64af4ab1e.zip
Fix few small bugs
Diffstat (limited to 'grapher/Models/Options/ActiveValueLabelXY.cs')
-rw-r--r--grapher/Models/Options/ActiveValueLabelXY.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/grapher/Models/Options/ActiveValueLabelXY.cs b/grapher/Models/Options/ActiveValueLabelXY.cs
index 3f94847..e6e4f52 100644
--- a/grapher/Models/Options/ActiveValueLabelXY.cs
+++ b/grapher/Models/Options/ActiveValueLabelXY.cs
@@ -22,10 +22,7 @@ namespace grapher.Models.Options
X = x;
Y = y;
- FullWidth = x.Width;
- ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2;
-
- Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation;
+ Align(x.Width);
Y.Width = ShortenedWidth;
Y.FormatString = Constants.ShortenedFormatString;
@@ -43,6 +40,19 @@ namespace grapher.Models.Options
public bool Combined { get; private set; }
+ public int Left
+ {
+ get
+ {
+ return X.Left;
+ }
+ set
+ {
+ X.Left = value;
+ SetYLeft();
+ }
+ }
+
private int FullWidth { get; set; }
private int ShortenedWidth { get; set; }
@@ -112,10 +122,15 @@ namespace grapher.Models.Options
FullWidth = width;
ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2;
- Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation;
+ SetYLeft();
Y.Width = ShortenedWidth;
}
+ private void SetYLeft()
+ {
+ Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation;
+ }
+
#endregion Methods
}
}