centered windozzz

This commit is contained in:
STEINNI
2026-06-05 16:23:40 +00:00
parent 5207a3b18e
commit b122cf153e
4 changed files with 19 additions and 31 deletions
+9 -2
View File
@@ -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`,