Browse Source

Merge pull request #831 in BA/design from ~YAOH.WU/design_0407:release to release

* commit 'c72bb1de5577f4dc1ba591fed5238d69778e76b6':
  组件复用边界粘贴,之前考虑的片面了,修改下
master
superman 8 years ago
parent
commit
a41dcf7bee
  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