MCPcopy
hub / github.com/witheve/Eve / findPaneAt

Method findPaneAt

src/ide.ts:2897–2909  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

2895 //-------------------------------------------------------
2896
2897 findPaneAt(x: number, y: number):"editor"|"application"|undefined {
2898 let editorContainer = this.editor.cm.getWrapperElement();
2899 let editor = editorContainer && editorContainer.getBoundingClientRect();
2900 let appContainer = document.querySelector(".application-container")
2901 let app = appContainer && appContainer.getBoundingClientRect(); // @FIXME: Not particularly durable
2902 if(editor && x >= editor.left && x <= editor.right &&
2903 y >= editor.top && y <= editor.bottom) {
2904 return "editor";
2905 } else if(app && x >= app.left && x <= app.right &&
2906 y >= app.top && y <= app.bottom) {
2907 return "application";
2908 }
2909 }
2910
2911 enableInspector() {
2912 //window.addEventListener("mouseover", this.updateInspector);

Callers 1

IDEClass · 0.95

Calls 1

getWrapperElementMethod · 0.80

Tested by

no test coverage detected