Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let mutable offsetAux = PointF(dragOffset.X /2.f, dragOffset.Y/2.f);
- nodes |> Seq.iter(fun y ->
- if offsetAux.X > 1.f || offsetAux.Y > 1.f then
- let n = nodes |> Seq.tryFind(fun y -> y.Selected);
- match n with
- |Some n -> let mutable a = 0.f;
- let mutable b = 0.f;
- if offsetAux.X > 0.f then
- a <- n.Location.X * 1.001f
- elif offsetAux.X < 0.f then
- a <- n.Location.X / 1.001f
- else
- a <- 0.f
- if offsetAux.Y > 0.f then
- b <- n.Location.Y * 1.001f
- elif offsetAux.Y < 0.f then
- b <- n.Location.Y / 1.001f
- else
- b <- 0.f
- printf "A: %f" a
- printf "B: %f" b
- n.Location <- PointF(a, b)
- |None -> ()
- offsetAux <- PointF(offsetAux.X / 2.f, offsetAux.Y / 2.f);
- printfn "Animazione! %A" offsetAux
- this.Invalidate();
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement