From 5c39f741ffbf5284129f5a022b3e0ed3f88cdc22 Mon Sep 17 00:00:00 2001 From: glitch4347 Date: Wed, 29 Nov 2023 14:18:15 +0100 Subject: [PATCH 1/4] hotfix: call mouseOver and mouseMove to render crosshair on init and zoomin --- src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.ts b/src/index.ts index e0138a7..ca82f37 100644 --- a/src/index.ts +++ b/src/index.ts @@ -321,6 +321,7 @@ export class LinePod extends ChartwerkPod { } onMouseOver(): void { + this.onMouseMove(); this.crosshair.style('display', null); this.crosshair.selectAll('.crosshair-circle') .style('display', null); @@ -335,6 +336,11 @@ export class LinePod extends ChartwerkPod { return this.options.doubleClickEvent.isActive; } + protected onBrushEnd(): void { + super.onBrushEnd(); + this.onMouseOver(); + } + // methods below rewrite s, (move more methods here) protected zoomOut(): void { if(d3.event.type === 'dblclick' && !this.isDoubleClickActive()) { From a6841a83b00060bae1f2eefe3846e6808df26ab8 Mon Sep 17 00:00:00 2001 From: glitch4347 Date: Thu, 30 Nov 2023 10:09:21 +0100 Subject: [PATCH 2/4] set git repo in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1b8a726..fdb1ffd 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "repository": { "type": "git", - "url": "https://gitlab.com/chartwerk/line-pod.git" + "url": "http://code.corpglory.net/chartwerk/line-pod.git" }, "author": "CorpGlory", "license": "ISC", From 2e156ad46bd7ca5c98491459f3993a13a0dbf8bc Mon Sep 17 00:00:00 2001 From: glitch4347 Date: Sun, 3 Dec 2023 14:02:08 +0100 Subject: [PATCH 3/4] add node_resolutinos for linking case & update readme --- README.md | 20 +++++++++++++++++++- build/webpack.base.conf.js | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08801bc..0346816 100755 --- a/README.md +++ b/README.md @@ -23,4 +23,22 @@ [Live Chart](https://code.corpglory.net/chartwerk/line-pod/src/branch/main/examples/demo_live.html) -[Vertical Chart](https://code.corpglory.net/chartwerk/line-pod/src/branch/main/examples/demo_vertical.html) \ No newline at end of file +[Vertical Chart](https://code.corpglory.net/chartwerk/line-pod/src/branch/main/examples/demo_vertical.html) + + +### Development + +If you want to link `core` then clone it to same directory and then run + +``` +yarn link ../core +``` + +but don't add `resolutions` logic to `package.json` + +then run + +``` +yarn install +yarn dev +``` \ No newline at end of file diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index f189e91..1e52c18 100755 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -25,6 +25,10 @@ module.exports = { }, resolve: { extensions: ['.ts', '.js'], + // this is necessary for resolution of external libs like d3 in dev mode + // in linkind: webpack will take d3 from this node_modules but not from + // internal so you get one version of d3 + modules: [path.resolve(__dirname, '../node_modules'), 'node_modules'] }, output: { filename: 'index.js', From 833780105a816e8871925ba7510c19e46285f822 Mon Sep 17 00:00:00 2001 From: glitch4347 Date: Sun, 3 Dec 2023 14:03:54 +0100 Subject: [PATCH 4/4] fx type in conf --- build/webpack.base.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 1e52c18..97b8a60 100755 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -26,7 +26,7 @@ module.exports = { resolve: { extensions: ['.ts', '.js'], // this is necessary for resolution of external libs like d3 in dev mode - // in linkind: webpack will take d3 from this node_modules but not from + // when core is linked: webpack will take d3 from this node_modules but not from // internal so you get one version of d3 modules: [path.resolve(__dirname, '../node_modules'), 'node_modules'] },