MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / makeVirtualElement

Function makeVirtualElement

frontend/preview/preview-contextmenu.tsx:48–64  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

46const previewContextMenuItemIds = new WeakMap<ContextMenuItem, string>();
47
48function makeVirtualElement(x: number, y: number): VirtualElement {
49 return {
50 getBoundingClientRect() {
51 return {
52 x,
53 y,
54 width: 0,
55 height: 0,
56 top: y,
57 right: x,
58 bottom: y,
59 left: x,
60 toJSON: () => ({}),
61 } as DOMRect;
62 },
63 };
64}
65
66function isPathOpen(openPath: number[], path: number[]): boolean {
67 if (path.length > openPath.length) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected