chenluhua1980
昨天 a79fcf6a937e1bfe57014d2c99f1bb9f98bfa892
SourceCode/Bond/Servo/EqsGraphWnd.cpp
@@ -1464,6 +1464,8 @@
      GetItemRect(m_pCurItem, &rcItem);
      if (::GetCapture() == NULL) {
         const int kDragThreshold = 3; // debounce: click should not trigger line recalculation
         bool bDragging = false;
         SetCapture(m_hWnd);
         ASSERT(m_hWnd == GetCapture());
         AfxLockTempMaps();
@@ -1479,6 +1481,14 @@
            case WM_MOUSEMOVE:
               ptNew = msg.pt;
               ::ScreenToClient(m_hWnd, &ptNew);
               if (!bDragging) {
                  if (abs(ptNew.x - pt.x) >= kDragThreshold || abs(ptNew.y - pt.y) >= kDragThreshold) {
                     bDragging = true;
                  }
                  else {
                     break;
                  }
               }
               rcNewItem.left = rcItem.left + (ptNew.x - pt.x);
               rcNewItem.right = rcItem.right + (ptNew.x - pt.x);
               rcNewItem.top = rcItem.top + (ptNew.y - pt.y);
@@ -1494,6 +1504,10 @@
            case WM_LBUTTONUP:
               ptNew = msg.pt;
               ::ScreenToClient(m_hWnd, &ptNew);
               if (!bDragging) {
                  ReleaseCapture();
                  goto ExitLoop;
               }
               m_pCurItem->rect.left = m_nMagneticLinVer > 0 ? m_nMagneticLinVer : (rcItem.left + (ptNew.x - pt.x) + m_nOffsetX);
               m_pCurItem->rect.right = m_pCurItem->rect.left + (rcItem.right - rcItem.left);
               m_pCurItem->rect.top = m_nMagneticLinHoz > 0 ? m_nMagneticLinHoz : (rcItem.top + (ptNew.y - pt.y) + m_nOffsetY);