From 92e54869e06a95eb47cf36b1cc63ebaea1362b6a Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 23 Mar 2019 17:59:06 -0700 Subject: [PATCH] Better initial layout when viewing library --- demo/js/index.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/demo/js/index.js b/demo/js/index.js index 3a0df8a5..da05fa8a 100644 --- a/demo/js/index.js +++ b/demo/js/index.js @@ -135,19 +135,20 @@ Raven.context(async () => { __butterchurnOptions = getButterchurnOptions(startWithMilkdropHidden); - if (startWithMilkdropHidden) { + if (library) { + __initialWindowLayout = { + [WINDOWS.MAIN]: { position: { x: 0, y: 0 } }, + [WINDOWS.EQUALIZER]: { position: { x: 0, y: 116 } }, + [WINDOWS.PLAYLIST]: { position: { x: 0, y: 232 }, size: [0, 4] }, + [WINDOWS.MEDIA_LIBRARY]: { position: { x: 275, y: 0 }, size: [7, 12] }, + }; + } else if (startWithMilkdropHidden) { __initialWindowLayout = { [WINDOWS.MAIN]: { position: { x: 0, y: 0 } }, [WINDOWS.EQUALIZER]: { position: { x: 0, y: 116 } }, [WINDOWS.PLAYLIST]: { position: { x: 0, y: 232 }, size: [0, 0] }, [WINDOWS.MILKDROP]: { position: { x: 0, y: 348 }, size: [0, 0] }, }; - if (library) { - __initialWindowLayout[WINDOWS.MEDIA_LIBRARY] = { - position: { x: 0, y: 348 }, - size: [0, 0], - }; - } } else { __initialWindowLayout = { [WINDOWS.MAIN]: { position: { x: 0, y: 0 } }, @@ -155,12 +156,6 @@ Raven.context(async () => { [WINDOWS.PLAYLIST]: { position: { x: 0, y: 232 }, size: [0, 4] }, [WINDOWS.MILKDROP]: { position: { x: 275, y: 0 }, size: [7, 12] }, }; - if (library) { - __initialWindowLayout[WINDOWS.MEDIA_LIBRARY] = { - position: { x: 275, y: 0 }, - size: [7, 12], - }; - } } document.getElementById("butterchurn-share").style.display = "flex";