starting KF Editor
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user