Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/replay/backend/overlays/LocationsMenu.ts
1030 views
1
import BaseOverlay from '~backend/overlays/BaseOverlay';
2
import IRectangle from '~shared/interfaces/IRectangle';
3
4
export default class LocationsMenu extends BaseOverlay {
5
constructor() {
6
const menuHeight = 470;
7
super({
8
name: 'locations-menu',
9
calcBounds(bounds: IRectangle) {
10
return {
11
width: bounds.width + 32,
12
height: menuHeight,
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