Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3174


Ignore:
Timestamp:
03/22/10 14:39:53 (15 years ago)
Author:
mkommend
Message:

corrected selection of horizontal connections (ticket#867)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Connections/Connection.cs

    r3038 r3174  
    198198      if (RectangleF.Union(r1, r2).Contains(p))
    199199      {
    200         if (p1.Y < p2.Y) //SWNE
    201         {
    202           o = r1.Left + (((r2.Left - r1.Left) * (p.Y - r1.Bottom)) / (r2.Bottom - r1.Bottom));
    203           u = r1.Right + (((r2.Right - r1.Right) * (p.Y - r1.Top)) / (r2.Top - r1.Top));
    204           return ((p.X > o) && (p.X < u));
    205         }
    206         else //NWSE
    207         {
    208           o = r1.Left + (((r2.Left - r1.Left) * (p.Y - r1.Top)) / (r2.Top - r1.Top));
    209           u = r1.Right + (((r2.Right - r1.Right) * (p.Y - r1.Bottom)) / (r2.Bottom - r1.Bottom));
    210           return ((p.X > o) && (p.X < u));
    211         }
     200        //if (p1.Y < p2.Y) //SWNE
     201        //{
     202        //  o = r1.Left + (((r2.Left - r1.Left) * (p.Y - r1.Bottom)) / (r2.Bottom - r1.Bottom));
     203        //  u = r1.Right + (((r2.Right - r1.Right) * (p.Y - r1.Top)) / (r2.Top - r1.Top));
     204        //  return ((p.X > o) && (p.X < u));
     205        //} else //NWSE
     206        //{
     207        //  o = r1.Left + (((r2.Left - r1.Left) * (p.Y - r1.Top)) / (r2.Top - r1.Top));
     208        //  u = r1.Right + (((r2.Right - r1.Right) * (p.Y - r1.Bottom)) / (r2.Bottom - r1.Bottom));
     209        //  return ((p.X > o) && (p.X < u));
     210        //}
     211        return true;
    212212      }
    213213      return false;
Note: See TracChangeset for help on using the changeset viewer.