From c354bd930f6f6b9540f76171524da01b3f29162a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 26 Feb 2021 22:51:07 -0600 Subject: [PATCH 1/3] fix: datatips were shown on mouse move even when disabled in the configs --- lib/datatip-manager.ts | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/datatip-manager.ts b/lib/datatip-manager.ts index 59b3dfc..950eb49 100644 --- a/lib/datatip-manager.ts +++ b/lib/datatip-manager.ts @@ -487,24 +487,26 @@ export class DataTipManager { }) disposables.add(new Disposable(() => overlayMarker.destroy())) - element.addEventListener("mouseenter", () => { - this.editorView?.removeEventListener("mousemove", this.onMouseMoveEvt) - }) + if (this.showDataTipOnMouseMove) { + element.addEventListener("mouseenter", () => { + this.editorView?.removeEventListener("mousemove", this.onMouseMoveEvt) + }) - element.addEventListener("mouseleave", () => { - this.editorView?.addEventListener("mousemove", this.onMouseMoveEvt) - }) + element.addEventListener("mouseleave", () => { + this.editorView?.addEventListener("mousemove", this.onMouseMoveEvt) + }) + + disposables.add( + new Disposable(() => { + this.editorView?.addEventListener("mousemove", this.onMouseMoveEvt) + view.destroy() + }) + ) + } // TODO move this code to atom-ide-base element.addEventListener("wheel", this.onMouseWheel, { passive: true }) - disposables.add( - new Disposable(() => { - this.editorView?.addEventListener("mousemove", this.onMouseMoveEvt) - view.destroy() - }) - ) - return disposables } From 3ce7d5f0c5e76703be7ba720bcf57ce5fd5aa7e4 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 26 Feb 2021 22:52:34 -0600 Subject: [PATCH 2/3] fix: increase wait time for showing datatips to 100ms --- lib/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.json b/lib/config.json index 9c2d343..985947b 100644 --- a/lib/config.json +++ b/lib/config.json @@ -15,7 +15,7 @@ "title": "Hover/Stay Time", "description": "The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms].", "type": "number", - "default": 80 + "default": 100 }, "glowOnHover": { "title": "Glow on hover", From 92fb28deec055deb87c6753d45e0442cbfcfdc87 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 26 Feb 2021 22:53:28 -0600 Subject: [PATCH 3/3] chore: add tsc.dev --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 164fdc0..e6adc4d 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "test.integration": "npm run build && atom --test spec", "clean": "shx rm -rf dist", "tsc": "tsc -p ./lib/tsconfig.json", + "tsc.dev": "npm run tsc -- --watch", "dev": "npm run clean && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=true rollup -c -w", "build": "npm run clean && cross-env NODE_ENV=production cross-env BABEL_KEEP_MODULES=true rollup -c", "build-commit": "build-commit -o dist",