Browse Source

组件复用边界粘贴,之前考虑的片面了,修改下

master
yaoh.wu 8 years ago
parent
commit
c72bb1de55
  1. 4
      designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java

4
designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java

@ -133,8 +133,10 @@ public class FormSelectionUtils {
boolean xOut = x < 0 || x + copiedCreator.getWidth() / 2 + xoffset > container.getWidth(); boolean xOut = x < 0 || x + copiedCreator.getWidth() / 2 + xoffset > container.getWidth();
boolean yOut = y < 0 || y + copiedCreator.getHeight() / 2 + yoffset > container.getHeight(); boolean yOut = y < 0 || y + copiedCreator.getHeight() / 2 + yoffset > container.getHeight();
boolean isEdge = (x - DELAY_X_Y == container.getWidth() - copiedCreator.getWidth() / 2 - xoffset)
&& (y - DELAY_X_Y == container.getHeight() - copiedCreator.getHeight() / 2 - yoffset);
y = yOut ? container.getHeight() - copiedCreator.getHeight() / 2 - yoffset : y; y = yOut ? container.getHeight() - copiedCreator.getHeight() / 2 - yoffset : y;
boolean isEdge = (x - DELAY_X_Y == container.getWidth() - copiedCreator.getWidth() / 2 - xoffset);
if (xOut) { if (xOut) {
if (isEdge) { if (isEdge) {
//向左偏移 //向左偏移

Loading…
Cancel
Save