Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/replay/backend/overlays/ListMenu.ts
1030 views
1
import BaseOverlay from "~backend/overlays/BaseOverlay";
2
import IRectangle from "~shared/interfaces/IRectangle";
3
4
export default class ListMenu extends BaseOverlay {
5
constructor() {
6
const defaultHeight = 300;
7
super({
8
name: 'list-menu',
9
calcBounds(bounds: IRectangle) {
10
return {
11
width: bounds.width + 32,
12
height: defaultHeight,
13
x: bounds.x - 16,
14
y: bounds.y + bounds.height - 5,
15
};
16
},
17
onWindowBoundsUpdate: () => {
18
this.hide();
19
},
20
});
21
}
22
}
23
24