WindowFormElement

This commit is contained in:
2025-09-15 15:33:58 +08:00
parent 3401c8b737
commit 9a30c2b3d7
5 changed files with 710 additions and 13 deletions
+13 -1
View File
@@ -7,6 +7,8 @@ import type { WindowFormPos } from '@/core/window/types/WindowFormTypes.ts'
import { processManager } from '@/core/process/ProcessManager.ts'
import { DraggableResizableWindow } from '@/core/utils/DraggableResizableWindow.ts'
import '../css/window-form.scss'
import { serviceManager } from '@/core/service/kernel/ServiceManager.ts'
import '../ui/WindowFormElement.ts'
export default class WindowFormImpl implements IWindowForm {
private readonly _id: string = uuidV4();
@@ -26,6 +28,9 @@ export default class WindowFormImpl implements IWindowForm {
private get desktopRootDom() {
return XSystem.instance.desktopRootDom;
}
private get sm() {
return serviceManager.getService('WindowForm')
}
public get windowFormEle() {
return this.dom;
}
@@ -71,7 +76,14 @@ export default class WindowFormImpl implements IWindowForm {
},
})
this.desktopRootDom.appendChild(this.dom);
// this.desktopRootDom.appendChild(this.dom);
const wf = document.createElement('window-form-element')
wf.dragContainer = document.body
wf.snapDistance = 20
wf.addEventListener('onDragStart', (e) => {
console.log('dragstart')
})
this.desktopRootDom.appendChild(wf)
}
public closeWindowForm() {