private void OnMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (e.ChangedButton == MouseButton.Left)
     {
         isMouseDown = false;
         if (clickPos == e.GetPosition(plotter.CentralGrid))
         {
             timer.Stop();
             animation = null;
         }
         else
         {
             if (animation.IsFinished)
             {
                 timer.Stop();
                 animation = null;
             }
             else
             {
                 animation.UseMouse = false;
                 animation.LiquidFrictionQuadraticCoeff = 1;
             }
         }
     }
 }
		private void OnMouseUp(object sender, MouseButtonEventArgs e)
		{
			if (e.ChangedButton == MouseButton.Left)
			{
				isMouseDown = false;
				if (clickPos == e.GetPosition(plotter.CentralGrid))
				{
					timer.Stop();
					animation = null;
				}
				else
				{
					if (animation.IsFinished)
					{
						timer.Stop();
						animation = null;
					}
					else
					{
						animation.UseMouse = false;
						animation.LiquidFrictionQuadraticCoeff = 1;
					}
				}
			}
		}
        private void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton == MouseButton.Left)
            {
                clickPos = e.GetPosition(plotter.CentralGrid);

                isMouseDown = true;
                startTime   = DateTime.Now;

                animation = new PhysicalRectAnimation(
                    plotter.Viewport,
                    e.GetPosition(plotter.ViewportPanel));

                timer.Start();
            }
        }
		private void OnMouseDown(object sender, MouseButtonEventArgs e)
		{
			if (e.ChangedButton == MouseButton.Left)
			{
				clickPos = e.GetPosition(plotter.CentralGrid);

				isMouseDown = true;
				startTime = DateTime.Now;

				animation = new PhysicalRectAnimation(
					plotter.Viewport,
					e.GetPosition(plotter.ViewportPanel));

				timer.Start();
			}
		}