Browse Source

REPORT-4888 设计器交互修改

聚合报表单元报表缩放问题
master
MoMeak 7 years ago
parent
commit
e5a54886b5
  1. 10
      designer/src/com/fr/poly/creator/BlockCreator.java

10
designer/src/com/fr/poly/creator/BlockCreator.java

@ -114,10 +114,12 @@ public abstract class BlockCreator<T extends TemplateBlock> extends JComponent i
public Rectangle getEditorBounds() {
Rectangle bounds = this.getBounds();
Dimension d = getEditor().getCornerSize();
bounds.x -= d.width + designer.getHorizontalValue();
bounds.y -= d.height + designer.getVerticalValue();
bounds.width += d.width + PolyConstants.OPERATION_SIZE;
bounds.height += d.height + PolyConstants.OPERATION_SIZE;
//ECBlockCreator缩放的时候边框需要重新算下
double times = this.designer.getResolution() / (double)resolution;
bounds.x -= d.width/times + designer.getHorizontalValue();
bounds.y -= d.height/times + designer.getVerticalValue();
bounds.width += Math.ceil(d.width/times + PolyConstants.OPERATION_SIZE/times);
bounds.height += Math.ceil(d.height/times + PolyConstants.OPERATION_SIZE/times);
return bounds;
}

Loading…
Cancel
Save