diff options
| author | Jacob Palecki <[email protected]> | 2020-09-01 02:39:09 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-01 02:39:09 -0700 |
| commit | 4aa2f3ed741dcbd39233e125a34cac8163267d8d (patch) | |
| tree | 59399d8d793e7aa35c3a79fe369d19f7c3935ae4 /grapher/Models/Options/ActiveValueLabelXY.cs | |
| parent | Add constants class and separate classes into regions (diff) | |
| download | rawaccel-4aa2f3ed741dcbd39233e125a34cac8163267d8d.tar.xz rawaccel-4aa2f3ed741dcbd39233e125a34cac8163267d8d.zip | |
Move constants to central class
Diffstat (limited to 'grapher/Models/Options/ActiveValueLabelXY.cs')
| -rw-r--r-- | grapher/Models/Options/ActiveValueLabelXY.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/grapher/Models/Options/ActiveValueLabelXY.cs b/grapher/Models/Options/ActiveValueLabelXY.cs index 553ce48..c8caddf 100644 --- a/grapher/Models/Options/ActiveValueLabelXY.cs +++ b/grapher/Models/Options/ActiveValueLabelXY.cs @@ -10,8 +10,6 @@ namespace grapher.Models.Options { #region Constants - public const int ActiveLabelXYSeparation = 2; - public const string ShortenedFormatString = "0.###"; #endregion Constants @@ -25,11 +23,11 @@ namespace grapher.Models.Options Y = y; FullWidth = x.Width; - ShortenedWidth = (FullWidth - ActiveLabelXYSeparation) / 2; + ShortenedWidth = (FullWidth - Constants.ActiveLabelXYSeparation) / 2; - Y.Left = X.Left + ShortenedWidth + ActiveLabelXYSeparation; + Y.Left = X.Left + ShortenedWidth + Constants.ActiveLabelXYSeparation; Y.Width = ShortenedWidth; - Y.FormatString = ShortenedFormatString; + Y.FormatString = Constants.ShortenedFormatString; Combined = false; SetCombined(); @@ -72,7 +70,7 @@ namespace grapher.Models.Options { if (!Combined) { - X.FormatString = ActiveValueLabel.DefaultFormatString; + X.FormatString = Constants.DefaultActiveValueFormatString; X.Width = FullWidth; X.Prefix = string.Empty; Y.Hide(); @@ -85,7 +83,7 @@ namespace grapher.Models.Options { if (Combined) { - X.FormatString = ShortenedFormatString; + X.FormatString = Constants.ShortenedFormatString; X.Width = ShortenedWidth; X.Prefix = "X"; Y.Prefix = "Y"; @@ -95,6 +93,6 @@ namespace grapher.Models.Options Combined = false; } - #region Methods + #endregion Methods } } |