Revision 45610 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/PolygonBehavior.java
PolygonBehavior.java | ||
---|---|---|
81 | 81 |
isClicked = true; |
82 | 82 |
|
83 | 83 |
if (arrayX.isEmpty()) { |
84 |
addPoint(getMapControl().getViewPort().toMapPoint(e.getPoint()));
|
|
85 |
addPoint(getMapControl().getViewPort().toMapPoint(e.getPoint()));
|
|
86 |
addPoint(getMapControl().getViewPort().toMapPoint(e.getPoint()));
|
|
84 |
addPoint(getMapControl().convertToMapPoint(e.getPoint(), this.getUseSnapping()));
|
|
85 |
addPoint(getMapControl().convertToMapPoint(e.getPoint(), this.getUseSnapping()));
|
|
86 |
addPoint(getMapControl().convertToMapPoint(e.getPoint(), this.getUseSnapping()));
|
|
87 | 87 |
} else { |
88 |
addAntPoint(getMapControl().getViewPort().toMapPoint(e.getPoint()));
|
|
88 |
addAntPoint(getMapControl().convertToMapPoint(e.getPoint(), this.getUseSnapping()));
|
|
89 | 89 |
} |
90 | 90 |
|
91 | 91 |
listener.pointFixed(new MeasureEvent((Double[]) arrayX.toArray(new Double[arrayX.size()]), (Double[]) arrayY.toArray(new Double[arrayY.size()]), e)); |
... | ... | |
123 | 123 |
@Override |
124 | 124 |
public void mouseMoved(MouseEvent e) throws BehaviorException { |
125 | 125 |
if (isClicked) { |
126 |
changeAntPoint(getMapControl().getViewPort().toMapPoint(e.getPoint()));
|
|
126 |
changeAntPoint(getMapControl().convertToMapPoint(e.getPoint(), this.getUseSnapping()));
|
|
127 | 127 |
|
128 | 128 |
MeasureEvent event = new MeasureEvent((Double[]) arrayX.toArray(new Double[arrayX.size()]), (Double[]) arrayY.toArray(new Double[arrayY.size()]), e); |
129 | 129 |
|
Also available in: Unified diff