diff --git a/designer/src/com/fr/poly/creator/BlockCreator.java b/designer/src/com/fr/poly/creator/BlockCreator.java index 052e111a8..a5e9535c2 100644 --- a/designer/src/com/fr/poly/creator/BlockCreator.java +++ b/designer/src/com/fr/poly/creator/BlockCreator.java @@ -114,10 +114,12 @@ public abstract class BlockCreator 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; }