Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/replay/backend/storage/WindowStateDb.ts
1030 views
1
import BaseDb from './BaseDb';
2
3
const defaultWindowState = {};
4
5
export default class ConfigsDb extends BaseDb<IWindowState> {
6
constructor() {
7
super('WindowState', { ...defaultWindowState });
8
}
9
10
public fetch() {
11
return { ...this.allData };
12
}
13
14
public update(newData: IWindowState) {
15
Object.assign(this.allData, newData);
16
}
17
}
18
19
export interface IWindowState {
20
isMaximized?: boolean;
21
isFullscreen?: boolean;
22
bounds?: {
23
x: number;
24
y: number;
25
width: number;
26
height: number;
27
};
28
}
29
30