}
function imgSettings() {
- if (document.getElementById("mandelbrotWindow").nodeName == "page")
- document.getElementById("imgSettingsPanel").showPopup(null, "before_start");
- else
- window.openDialog("chrome://mandelbrot/content/image-settings.xul");
+ let anchor = null;
+ let position = "before_start";
+ if (document.getElementById("mandelbrotWindow").nodeName == "page") {
+ anchor = document.getElementById("mandelbrotToolbar");
+ }
+ else {
+ anchor = document.getElementById("mandelbrotMenubar");
+ position = "after_start";
+ }
+ document.getElementById("imgSettingsPanel").showPopup(anchor, position);
}
function updateDebugMenu() {