Browse Source

Merge branch 'main' into yarn-workspaces

yarn-workspaces
rozetko 12 months ago
parent
commit
9efe2a3276
  1. 18
      README.md
  2. 2
      package.json
  3. 4
      packages/line-pod/build/webpack.base.conf.js
  4. 6
      packages/line-pod/src/index.ts

18
README.md

@ -24,3 +24,21 @@
[Live Chart](https://code.corpglory.net/chartwerk/line-pod/src/branch/main/examples/demo_live.html) [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) [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
```

2
package.json

@ -8,7 +8,7 @@
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitlab.com/chartwerk/line-pod.git" "url": "http://code.corpglory.net/chartwerk/line-pod.git"
}, },
"author": "CorpGlory", "author": "CorpGlory",
"license": "ISC", "license": "ISC",

4
packages/line-pod/build/webpack.base.conf.js

@ -25,6 +25,10 @@ module.exports = {
}, },
resolve: { resolve: {
extensions: ['.ts', '.js'], 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: { output: {
filename: 'index.js', filename: 'index.js',

6
packages/line-pod/src/index.ts

@ -321,6 +321,7 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
} }
onMouseOver(): void { onMouseOver(): void {
this.onMouseMove();
this.crosshair.style('display', null); this.crosshair.style('display', null);
this.crosshair.selectAll('.crosshair-circle') this.crosshair.selectAll('.crosshair-circle')
.style('display', null); .style('display', null);
@ -335,6 +336,11 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
return this.options.doubleClickEvent.isActive; return this.options.doubleClickEvent.isActive;
} }
protected onBrushEnd(): void {
super.onBrushEnd();
this.onMouseOver();
}
// methods below rewrite s, (move more methods here) // methods below rewrite s, (move more methods here)
protected zoomOut(): void { protected zoomOut(): void {
if(d3.event.type === 'dblclick' && !this.isDoubleClickActive()) { if(d3.event.type === 'dblclick' && !this.isDoubleClickActive()) {

Loading…
Cancel
Save