Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.3.1
-
Fix Version/s: UDIG 1.3.1
-
Component/s: tools and editing
-
Labels:None
Description
Right click on a map with zoom tool enabled, expected functionality is to zoom out, instead it zooms in.
I have restored the logic from 1.2.x as follows:
try {
Coordinate center = m.pixelToWorld( (int)r.getCenterX(), (int)r.getCenterY() );
double zoomFactor = ((double)r.width) / ((double)getContext().getMapDisplay().getWidth());
ZoomCommand cmd = new ZoomCommand(zoomFactor);
cmd.setFixedPoint(center);
getContext().sendASyncCommand(cmd);
} catch (Exception e) {
return; // could not zoom out
}