Browse Source

REPORT-4450 聚合报表在缩放后编辑报表块,会出现单元格错乱

修改xy坐标
master
momeak 7 years ago
parent
commit
28eeb01925
  1. 2
      designer/src/com/fr/poly/PolyDesignUI.java
  2. 8
      designer/src/com/fr/poly/creator/ECBlockCreator.java

2
designer/src/com/fr/poly/PolyDesignUI.java

@ -106,7 +106,7 @@ public class PolyDesignUI extends ComponentUI {
BlockCreator creator = addedData.getAddedAt(i);
// richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来
if (creator == designer.getSelection()) {
paintPositionLine(g, Math.round(creator.getX() * time), Math.round(creator.getY() * time),
paintPositionLine(g, Math.round(creator.getX(time)), Math.round(creator.getY(time)),
Math.round(designer.getHorizontalValue()*time), Math.round(designer.getVerticalValue()*time));
if (creator.getEditor().isDragging()) {
creator.getEditor().paintAbsorptionline(g);

8
designer/src/com/fr/poly/creator/ECBlockCreator.java

@ -23,8 +23,8 @@ import com.fr.stable.unit.UnitRectangle;
*/
public class ECBlockCreator extends BlockCreator<PolyECBlock> {
private ECBlockEditor editor;
private static final int CREATOR_WIDTH = 30;
private static final int CREATOR_HEIGHT = 19;
private static final int CREATOR_WIDTH = 20;
private static final int CREATOR_HEIGHT = 9;
public ECBlockCreator() {
@ -69,12 +69,12 @@ public class ECBlockCreator extends BlockCreator<PolyECBlock> {
@Override
public int getX(float time) {
return (int) ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH;
return Math.round ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH;
}
@Override
public int getY(float time) {
return (int) ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT;
return Math.round ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT;
}
/**

Loading…
Cancel
Save