if (zoomend.y < zoomstart.y)
[zoomend.y, zoomstart.y] = [zoomstart.y, zoomend.y];
- let prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- let ok = prompts.confirm(null, gMbrotBundle.getString("zoomConfirmTitle"),
- gMbrotBundle.getString("zoomConfirmLabel"));
- // ok is now true if OK was clicked, and false if cancel was clicked
- if (ok) {
- // determine new "coordinates"
- let CWidth = gCurrentImageData.C_max.r - gCurrentImageData.C_min.r;
- let CHeight = gCurrentImageData.C_max.i - gCurrentImageData.C_min.i;
- let newC_min = new complex(
- gCurrentImageData.C_min.r + zoomstart.x / gCurrentImageData.iWidth * CWidth,
- gCurrentImageData.C_min.i + zoomstart.y / gCurrentImageData.iHeight * CHeight);
- let newC_max = new complex(
- gCurrentImageData.C_min.r + zoomend.x / gCurrentImageData.iWidth * CWidth,
- gCurrentImageData.C_min.i + zoomend.y / gCurrentImageData.iHeight * CHeight);
-
- adjustCoordsAndDraw(newC_min, newC_max);
- }
+ // determine new "coordinates"
+ let CWidth = gCurrentImageData.C_max.r - gCurrentImageData.C_min.r;
+ let CHeight = gCurrentImageData.C_max.i - gCurrentImageData.C_min.i;
+ let newC_min = new complex(
+ gCurrentImageData.C_min.r + zoomstart.x / gCurrentImageData.iWidth * CWidth,
+ gCurrentImageData.C_min.i + zoomstart.y / gCurrentImageData.iHeight * CHeight);
+ let newC_max = new complex(
+ gCurrentImageData.C_min.r + zoomend.x / gCurrentImageData.iWidth * CWidth,
+ gCurrentImageData.C_min.i + zoomend.y / gCurrentImageData.iHeight * CHeight);
+
+ adjustCoordsAndDraw(newC_min, newC_max);
}
zoomstart = undefined;
break;