diff --git a/app/assets/styles/app.css b/app/assets/styles/app.css index a52b06f..ce72c0f 100755 --- a/app/assets/styles/app.css +++ b/app/assets/styles/app.css @@ -347,33 +347,6 @@ article[eiccard][media] > header { font-size: 1.6rem; } -[device="tablet"] section .cols-2:not(.noflex), [device="mobile"] section .cols-2:not(.noflex) { - display: flex; - flex-direction: column; - grid-template-columns: none; - align-items: initial; -} -[device="tablet"] .cols-3, [device="mobile"] .cols-3, -[device="tablet"] .cols-4, [device="mobile"] .cols-4, -[device="tablet"] .cols-5, [device="mobile"] .cols-5, -[device="mobile"] .cols-6 { - display: flex; - flex-direction: column; - grid-template-columns: none; -} - -[device="tablet"] .cols-6 { - grid-template-columns: 1fr 1fr 1fr; -} - -[device="tablet"] .cols-8 { - grid-template-columns: 1fr 1fr 1fr 1fr; -} - -[device="mobile"] .cols-8 { - grid-template-columns: 1fr 1fr; -} - div.window > section:first-of-type > article[eiccard]:first-of-type{ height:100%; border: 2px solid var(--app-color-primary); diff --git a/app/controllers/sims/SimsController.js b/app/controllers/sims/SimsController.js index 07cd9dd..e745aae 100644 --- a/app/controllers/sims/SimsController.js +++ b/app/controllers/sims/SimsController.js @@ -19,7 +19,7 @@ class SimsController extends WindozController { static: true, expanded: false, withSettings: false, - windowStyle: WindozDomContent.boxFromPrefs('sims.createsimview', { x: 50, y: 50, w: 800, h: 600 }), + windowStyle: WindozDomContent.boxFromPrefs('sims.createsimview', { x: 'center', y: 'center', w: 600, h: 300 }), }, { models: models, diff --git a/app/libs/Windoz/WindozDomContent.js b/app/libs/Windoz/WindozDomContent.js index 489dc96..5ab319e 100755 --- a/app/libs/Windoz/WindozDomContent.js +++ b/app/libs/Windoz/WindozDomContent.js @@ -276,12 +276,19 @@ class WindozDomContent extends View { left = box.x ? box.x : defaults.x top = box.y ? box.y : defaults.y width = box.w ? box.w : defaults.w - height = box.x ? box.h : defaults.h + height = box.h ? box.h : defaults.h } else { left = defaults.x top = defaults.y width = defaults.w - height = defaults.h + height = defaults.h + const ws = document.querySelector('[eicapp] .app-workspace')?.getBoundingClientRect() + const areaLeft = ws?.left ?? 0 + const areaTop = ws?.top ?? 0 + const areaWidth = ws?.width ?? window.innerWidth + const areaHeight = ws?.height ?? window.innerHeight + if(left === 'center') left = Math.round(areaLeft + (areaWidth - width) / 2) + if(top === 'center') top = Math.round(areaTop + (areaHeight - height) / 2) } return({ width: `${width}px`, diff --git a/app/views/sims/CreateSimView.html b/app/views/sims/CreateSimView.html index ddbd0af..fd18b79 100644 --- a/app/views/sims/CreateSimView.html +++ b/app/views/sims/CreateSimView.html @@ -1,11 +1,19 @@