From 67c8fcea43e1be97f8f05f38846a55a288801729 Mon Sep 17 00:00:00 2001 From: piotrruss Date: Tue, 11 Apr 2023 00:46:28 +0200 Subject: open new windows with offset position --- components/App.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/App.js b/components/App.js index f6a297b..75bbe77 100644 --- a/components/App.js +++ b/components/App.js @@ -26,11 +26,11 @@ const App = ({ children, app }) => { style={{ height: app.height, width: app.width, - ...app.pos.length + ...app.pos.length > 1 ? { top: app.pos[1], left: app.pos[0] } : { - top: `calc((( 100vh - ${app.height} ) / 2) + 2em)`, - left: `calc(( 100vw - ${app.width} ) / 2)` + top: `calc((( 100vh - ${app.height} ) / 2) + (2 * ${app.pos}rem))`, + left: `calc((( 100vw - ${app.width} ) / 2) + (2 * ${app.pos}rem) - 2rem)` } }} > -- cgit v1.2.3