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/package.json b/package.json index f800e5b..6b3b9ff 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,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", diff --git a/packages/line-pod/build/webpack.base.conf.js b/packages/line-pod/build/webpack.base.conf.js index f189e91..97b8a60 100755 --- a/packages/line-pod/build/webpack.base.conf.js +++ b/packages/line-pod/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 + // 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'] }, output: { filename: 'index.js', diff --git a/packages/line-pod/src/index.ts b/packages/line-pod/src/index.ts index e0138a7..ca82f37 100644 --- a/packages/line-pod/src/index.ts +++ b/packages/line-pod/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()) {