code: function getCoefedDistance(box1, box2) {
              var xMin, xMax, yMin, yMax, xDist, yDist, dist, cx, cy;
              xMin = min(box1.left, box2.left);
              xMax = max(box1.right, box2.right);
              yMin = min(box1.top, box2.top);
              yMax = max(box1.bottom, box2.bottom);
  
              xDist = xMax - xMin - box1.width - box2.width;
              yDist = yMax - yMin - box1.height - box2.height;
  
              if (xDist < 0) dist = yDist;
              else if (yDist < 0) dist = xDist;
              else dist = sqrt(xDist * xDist + yDist * yDist);
  
              var node1 = box1.node;
              var node2 = box2.node;
  
              // sibling
              if (node1.parent == node2.parent) {
                  dist /= 10;
              }
              // parent
              if (node2.parent == node1) {
                  dist /= 5;
              }
  
              return dist;
          }
docs: 这是金泉的点子，赞！ 求两个不相交矩形的最近距离