Restore tray size properly when maximised

This commit is contained in:
Nick O'Leary 2016-04-18 21:22:45 +01:00
parent 0efccc4758
commit 1861c1feb6
1 changed files with 6 additions and 1 deletions

View File

@ -91,6 +91,9 @@ RED.tray = (function() {
tray.preferredWidth = el.width();
if (options.width) {
if (options.width > $("#editor-stack").position().left-8) {
options.width = $("#editor-stack").position().left-8;
}
el.width(options.width);
}
tray.width = el.width();
@ -107,7 +110,9 @@ RED.tray = (function() {
setTimeout(function() {
setTimeout(function() {
el.width(tray.preferredWidth);
if (!options.width) {
el.width(tray.preferredWidth);
}
if (options.resize) {
options.resize({width:el.width()});
}