diff options
| author | Jacob Palecki <[email protected]> | 2020-09-01 22:42:07 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-01 22:42:07 -0700 |
| commit | 26130b21dabaab7fc331844df11465623a811197 (patch) | |
| tree | 79063acdf3df901da59191471c31218eef1e219e /grapher/Models/Options | |
| parent | intermittent commit - large commit halfway done (diff) | |
| download | rawaccel-26130b21dabaab7fc331844df11465623a811197.tar.xz rawaccel-26130b21dabaab7fc331844df11465623a811197.zip | |
Second half - the parts in place
Diffstat (limited to 'grapher/Models/Options')
| -rw-r--r-- | grapher/Models/Options/CapOptions.cs | 27 | ||||
| -rw-r--r-- | grapher/Models/Options/Option.cs | 5 |
2 files changed, 32 insertions, 0 deletions
diff --git a/grapher/Models/Options/CapOptions.cs b/grapher/Models/Options/CapOptions.cs index 6768a85..713842c 100644 --- a/grapher/Models/Options/CapOptions.cs +++ b/grapher/Models/Options/CapOptions.cs @@ -76,6 +76,27 @@ namespace grapher } } + public int Top + { + get + { + return CapOption.Top; + } + set + { + CapOption.Top = value; + } + } + + public int Height + { + get + { + return CapOption.Height; + } + } + + #endregion Properties #region Methods @@ -90,6 +111,12 @@ namespace grapher CapOption.Show(); } + public void SnapTo(Option option) + { + Top = option.Top + option.Height + Constants.OptionVerticalSeperation; + } + + public void SetActiveValues(double gainCap, double sensCap, bool capGainEnabled) { if (capGainEnabled) diff --git a/grapher/Models/Options/Option.cs b/grapher/Models/Options/Option.cs index bd2c9a1..2006dec 100644 --- a/grapher/Models/Options/Option.cs +++ b/grapher/Models/Options/Option.cs @@ -150,6 +150,11 @@ namespace grapher Top = option.Top + option.Height + Constants.OptionVerticalSeperation; } + public void SnapTo(CapOptions option) + { + Top = option.Top + option.Height + Constants.OptionVerticalSeperation; + } + #endregion Methods } } |