Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. let mutable offsetAux = PointF(dragOffset.X /2.f, dragOffset.Y/2.f);
  2. nodes |> Seq.iter(fun y ->
  3. if offsetAux.X > 1.f || offsetAux.Y > 1.f then
  4. let n = nodes |> Seq.tryFind(fun y -> y.Selected);
  5. match n with
  6. |Some n -> let mutable a = 0.f;
  7. let mutable b = 0.f;
  8. if offsetAux.X > 0.f then
  9. a <- n.Location.X * 1.001f
  10. elif offsetAux.X < 0.f then
  11. a <- n.Location.X / 1.001f
  12. else
  13. a <- 0.f
  14. if offsetAux.Y > 0.f then
  15. b <- n.Location.Y * 1.001f
  16. elif offsetAux.Y < 0.f then
  17. b <- n.Location.Y / 1.001f
  18. else
  19. b <- 0.f
  20. printf "A: %f" a
  21. printf "B: %f" b
  22. n.Location <- PointF(a, b)
  23. |None -> ()
  24. offsetAux <- PointF(offsetAux.X / 2.f, offsetAux.Y / 2.f);
  25. printfn "Animazione! %A" offsetAux
  26. this.Invalidate();
  27. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement