diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index 7312ac8a2..cc3782c62 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -1825,6 +1825,7 @@ RED.editor = (function() { var trayOptions = { title: getEditStackTitle(), + width: "inherit", buttons: [ { id: "node-dialog-cancel", @@ -2108,9 +2109,6 @@ RED.editor = (function() { }, show: function() {} } - if (editTrayWidthCache.hasOwnProperty(type)) { - trayOptions.width = editTrayWidthCache[type]; - } RED.tray.show(trayOptions); } @@ -2137,6 +2135,7 @@ RED.editor = (function() { } var trayOptions = { title: options.title || getEditStackTitle(), + width: "inherit", buttons: [ { id: "node-dialog-cancel", @@ -2205,9 +2204,6 @@ RED.editor = (function() { }, show: function() {} } - if (editTrayWidthCache.hasOwnProperty(type)) { - trayOptions.width = editTrayWidthCache[type]; - } RED.tray.show(trayOptions); } @@ -2221,6 +2217,7 @@ RED.editor = (function() { var trayOptions = { title: options.title || getEditStackTitle(), + width: "inherit", buttons: [ { id: "node-dialog-cancel", @@ -2272,9 +2269,6 @@ RED.editor = (function() { }, show: function() {} } - if (editTrayWidthCache.hasOwnProperty(type)) { - trayOptions.width = editTrayWidthCache[type]; - } RED.tray.show(trayOptions); } @@ -2317,6 +2311,7 @@ RED.editor = (function() { var trayOptions = { title: getEditStackTitle(), + width: "inherit", buttons: [ { id: "node-dialog-cancel", @@ -2459,9 +2454,6 @@ RED.editor = (function() { }, show: function() {} } - if (editTrayWidthCache.hasOwnProperty(type)) { - trayOptions.width = editTrayWidthCache[type]; - } RED.tray.show(trayOptions); } diff --git a/editor/js/ui/tray.js b/editor/js/ui/tray.js index f6351906e..43b4c3bde 100644 --- a/editor/js/ui/tray.js +++ b/editor/js/ui/tray.js @@ -216,6 +216,9 @@ RED.tray = (function() { show: function show(options) { if (stack.length > 0 && !options.overlay) { var oldTray = stack[stack.length-1]; + if (options.width === "inherit") { + options.width = oldTray.tray.width(); + } oldTray.tray.css({ right: -(oldTray.tray.width()+10)+"px" });