fixed preferences, fixed windows handles

This commit is contained in:
STEINNI
2025-09-27 18:05:42 +00:00
parent dd3b4f32f4
commit d336ad7ce1
5 changed files with 69 additions and 29 deletions
+40 -5
View File
@@ -58,7 +58,7 @@ body[eicapp] {
height: calc(100vh - var(--eicui-app-toolbar-height-active)); height: calc(100vh - var(--eicui-app-toolbar-height-active));
position: fixed; position: fixed;
top: var(--eicui-app-toolbar-height-active); top: var(--eicui-app-toolbar-height-active);
z-index: 2; z-index: 99;
} }
[eicapp] .app-workspace { [eicapp] .app-workspace {
display: grid; display: grid;
@@ -84,13 +84,11 @@ body[eicapp] {
[eicapp] > [eicmenu][collapsed]:not(:hover) + .app-workspace{ [eicapp] > [eicmenu][collapsed]:not(:hover) + .app-workspace{
padding-left: var(--app-menu-collapsed-width); padding-left: var(--app-menu-collapsed-width);
} }
[eicapp] .app-workspace .window { [eicapp] .app-workspace .window {
position: fixed; position: fixed;
padding: 3px; padding: 3px;
background: var(--app-color-secondary); background: var(--app-color-secondary);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.35); box-shadow: 0 0 20px rgba(147, 255, 255, 0.55);
cursor: nwse-resize;
right: auto; right: auto;
bottom: auto; bottom: auto;
overflow: hidden; overflow: hidden;
@@ -100,11 +98,11 @@ body[eicapp] {
max-width: 90vw; max-width: 90vw;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: .3rem;
} }
[eicapp] .app-workspace .window.active { [eicapp] .app-workspace .window.active {
z-index: 3; z-index: 3;
background: var(--app-color-primary); background: var(--app-color-primary);
border-radius: .3rem;
} }
[eicapp] .app-workspace .window > header { [eicapp] .app-workspace .window > header {
flex: 0 0 auto; flex: 0 0 auto;
@@ -185,6 +183,43 @@ body[eicapp] {
height: 100%; height: 100%;
} }
[eicapp] .app-workspace .window .handle {
position: absolute;
z-index: 2;
}
[eicapp] .app-workspace .window .handle[data-side="n"] {
top: -5px; left: 5px; right: 5px; height: 10px;
cursor: n-resize;
}
[eicapp] .app-workspace .window .handle[data-side="e"] {
top: 5px; right: -5px; bottom: 5px; width: 10px;
cursor: e-resize;
}
[eicapp] .app-workspace .window .handle[data-side="w"] {
top: 5px; left: -5px; bottom: 5px; width: 10px;
cursor: w-resize;
}
[eicapp] .app-workspace .window .handle[data-side="nw"] {
top: -5px; left: -5px; width: 10px; height: 10px;
cursor: nw-resize;
}
[eicapp] .app-workspace .window .handle[data-side="ne"] {
top: -5px; right: -5px; width: 10px; height: 10px;
cursor: ne-resize;
}
[eicapp] .app-workspace .window .handle[data-side="s"] {
bottom: -5px; left: 5px; right: 5px; height: 10px;
cursor: s-resize;
}
[eicapp] .app-workspace .window .handle[data-side="sw"] {
bottom: -5px; left: -5px; width: 10px; height: 10px;
cursor: sw-resize;
}
[eicapp] .app-workspace .window .handle[data-side="se"] {
bottom: -5px; right: -5px; width: 10px; height: 10px;
cursor: se-resize;
}
[eicapp] .app-content-thesaurus { [eicapp] .app-content-thesaurus {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@@ -11,7 +11,6 @@ class DashboardsController extends EICController {
*/ */
index() { index() {
const models = { const models = {
// mailings: new MailingsModel(payload['/mailings'].permissions)
} }
const ttb = new app.LoadedModules.Threetobus() const ttb = new app.LoadedModules.Threetobus()
@@ -19,17 +18,17 @@ class DashboardsController extends EICController {
const m1 = ttb.buildFromJSON(this.agentDefs.molecule1) const m1 = ttb.buildFromJSON(this.agentDefs.molecule1)
m1.name = 'agent42' m1.name = 'agent42'
ttb.scene.add(m1) ttb.scene.add(m1)
setTimeout(() => { // setTimeout(() => {
ttb.smoothRelMove({ // ttb.smoothRelMove({
object: m1, // object: m1,
dX: 5, // dX: 5,
dY:0, // dY:0,
dZ:0, // dZ:0,
delay: 1500, // delay: 1500,
easing: 'Quadratic', // easing: 'Quadratic',
easingMode: 'InOut', // easingMode: 'InOut',
}) // })
},3000) // },3000)
this.loadWindow( this.loadWindow(
'visualisers/SpaceView', 'visualisers/SpaceView',
+8
View File
@@ -101,6 +101,14 @@ class EICController extends Controller {
</div> </div>
</header> </header>
<section></section> <section></section>
<div class="handle" data-side="nw"></div>
<div class="handle" data-side="n"></div>
<div class="handle" data-side="ne"></div>
<div class="handle" data-side="e"></div>
<div class="handle" data-side="se"></div>
<div class="handle" data-side="s"></div>
<div class="handle" data-side="sw"></div>
<div class="handle" data-side="w"></div>
</div>`); </div>`);
if(options.expanded) content.setAttribute('expanded',''); if(options.expanded) content.setAttribute('expanded','');
if(options.windowStyle){ if(options.windowStyle){
+5 -8
View File
@@ -143,8 +143,7 @@ class EICDomContent extends View {
resizable(element, onResize) { resizable(element, onResize) {
let mouseX, mouseY, offset = 0, offsetY = 0, grab = ''; let mouseX, mouseY, offset = 0, offsetY = 0, grab = '';
// mouse button down over the element element.querySelectorAll(':scope > .handle').forEach(handle => handle.addEventListener('mousedown', onMouseDown))
element.addEventListener('mousedown', onMouseDown);
element.querySelector('section').addEventListener('mousedown', onBlockMouseDown); element.querySelector('section').addEventListener('mousedown', onBlockMouseDown);
@@ -158,16 +157,14 @@ class EICDomContent extends View {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
if(event.currentTarget.hasAttribute('expanded')) return false; if(event.currentTarget.parentElement.hasAttribute('expanded')) return false;
let limits = element.getBoundingClientRect(); let limits = element.getBoundingClientRect();
mouseX = event.clientX; mouseX = event.clientX;
mouseY = event.clientY; mouseY = event.clientY;
grab = ''; grab = event.currentTarget.dataset.side
grab += (Math.abs(mouseY - limits.y) < Math.abs(mouseY - (limits.bottom))) ? 'n':'s';
grab += (Math.abs(mouseX - limits.x) < Math.abs(mouseX - (limits.right))) ? 'e':'w';
offset = element.getBoundingClientRect(); offset = element.getBoundingClientRect();
@@ -207,11 +204,11 @@ class EICDomContent extends View {
if(grab.indexOf('s') > -1) { if(grab.indexOf('s') > -1) {
offset.height = offset.height + dy; offset.height = offset.height + dy;
} }
if(grab.indexOf('e') > -1) { if(grab.indexOf('w') > -1) {
offset.x = offset.x + dx; offset.x = offset.x + dx;
offset.width = offset.width - dx; offset.width = offset.width - dx;
} }
if(grab.indexOf('w') > -1) { if(grab.indexOf('e') > -1) {
offset.width = offset.width + dx; offset.width = offset.width + dx;
} }
+2 -1
View File
@@ -228,7 +228,8 @@ class myUser extends app.LoadedClasses.User {
if(app.MessageBus) { if(app.MessageBus) {
app.MessageBus.requestWssGwAction('GET', { key: `${this.identity.uuid}:userPrefs`}) app.MessageBus.requestWssGwAction('GET', { key: `${this.identity.uuid}:userPrefs`})
.then(settings => { .then(settings => {
this.preferences = settings.value; console.log("Prefs received from bus:", settings)
this.preferences = settings.value || {}
}) })
} }