starting KF Editor

This commit is contained in:
STEINNI
2025-10-13 20:46:48 +00:00
parent 2e0a223efe
commit d727679919
8 changed files with 198 additions and 31 deletions
+3 -21
View File
@@ -39,7 +39,7 @@ class DashboardsController extends EICController {
this.loadWindow(
'visualisers/SpaceView',
{
title: '3D view',
title: '<i class="icon-bolt"></i> Live arena 3D view',
static: true,
expanded: false,
withSettings: true,
@@ -58,7 +58,7 @@ class DashboardsController extends EICController {
this.loadWindow(
'visualisers/SpaceView',
{
title: '2D View',
title: '<i class="icon-bolt"></i> Live arena 2D View',
static: true,
expanded: false,
withSettings: true,
@@ -74,25 +74,7 @@ class DashboardsController extends EICController {
)
}
_boxFromPrefs(viewName, defaults){
function getPref(path) {
return path.split('.').reduce(
(acc, key) => acc?.[key],
app.User.preferences.windows
)
}
const box = getPref(viewName)
let left = box.x ? box.x : defaults.x
let top = box.y ? box.y : defaults.y
let width = box.w ? box.w : defaults.w
let height = box.x ? box.h : defaults.h
return({
width: `${width}px`,
height: `${height}px`,
left: `${left}px`,
top: `${top}px`,
})
}
}
app.registerClass('DashboardsController', DashboardsController);