aboutsummaryrefslogtreecommitdiffstats
path: root/components/App.js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2023-04-11 00:46:28 +0200
committerGravatar piotrruss <mail@pruss.it> 2023-04-11 00:57:47 +0200
commit67c8fcea43e1be97f8f05f38846a55a288801729 (patch)
tree57834432daf1f5cb3e2fee607e49b6f75279583f /components/App.js
parentf8463676a40656893c2048655e8807099e3adb39 (diff)
downloadmy_apps-67c8fcea43e1be97f8f05f38846a55a288801729.tar.gz
my_apps-67c8fcea43e1be97f8f05f38846a55a288801729.tar.bz2
my_apps-67c8fcea43e1be97f8f05f38846a55a288801729.zip
open new windows with offset position
Diffstat (limited to 'components/App.js')
-rw-r--r--components/App.js6
1 files changed, 3 insertions, 3 deletions
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)`
}
}}
>