uDIG
  1. uDIG
  2. UDIG-1865

Right click zoom out not working

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor 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.

        Activity

        Hide
        Jody Garnett added a comment -
        Okay got this one fixed; the contents of zooming and zoom out methods were identical.

        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
                }
        Show
        Jody Garnett added a comment - Okay got this one fixed; the contents of zooming and zoom out methods were identical. 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         }

          People

          • Assignee:
            Jody Garnett
            Reporter:
            John Hudson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: