diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 13:31:52 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 13:31:52 +0200 |
| commit | 24c01f34ad393be4da4af6b25a37e434cbc9cd44 (patch) | |
| tree | 384be6cd3d44efa8e6feb4769fce972e7ed4b705 /src/GraphicObjects/Scroller.cs | |
| parent | 61aeb72522c4ad315fed13d8ddd3d73f7a21bc2a (diff) | |
Documentation, analog meter tests
Diffstat (limited to 'src/GraphicObjects/Scroller.cs')
| -rw-r--r-- | src/GraphicObjects/Scroller.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs index b19c93ca..a413da94 100644 --- a/src/GraphicObjects/Scroller.cs +++ b/src/GraphicObjects/Scroller.cs @@ -76,8 +76,8 @@ namespace go [XmlIgnore]
public int MaximumScroll {
get {
- return VerticalScrolling ?
- Child.Slot.Height - ClientRectangle.Height :
+ return VerticalScrolling ?
+ child == null ? 0 : Child.Slot.Height - ClientRectangle.Height :
Child.Slot.Width - ClientRectangle.Width;
}
}
@@ -134,9 +134,6 @@ namespace go if (VerticalScrolling )
{
- //add redraw call with old bounds to errase old position
- RegisterForRedraw();
-
ScrollY -= e.Delta * ScrollSpeed;
if (ScrollY < 0.0)
@@ -147,9 +144,6 @@ namespace go }
if (HorizontalScrolling )
{
- //add redraw call with old bounds to errase old position
- RegisterForRedraw();
-
ScrollX -= e.Delta * ScrollSpeed;
if (ScrollX < 0.0)
@@ -157,11 +151,6 @@ namespace go else if (ScrollX > Child.Slot.Width - ClientRectangle.Width)
ScrollX = Child.Slot.Width - ClientRectangle.Width;
}
-
-
- //renderBounds.Y = -scrollY;
- //RegisterForRedraw();
- //Parent.registerForGraphicUpdate ();
}
#endregion
|