Skip to content

Commit 6eda1fa

Browse files
committed
fix: merge conflicts
1 parent 2d14a10 commit 6eda1fa

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

.playground/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"downlevelIteration": true,
55
"target": "es5"
66
},
7+
"include": ["../src/**/*", "./**/*"],
78
"exclude": [
89
"../**/*.test.*"
910
]

.storybook/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"extends": "../tsconfig",
3+
"include": ["../src/**/*", "../stories/**/*", "./**/*"],
34
"exclude": ["../**/*.test.*"]
45
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [12.0.2](https://github.com/elastic/elastic-charts/compare/v12.0.1...v12.0.2) (2019-09-16)
2+
3+
4+
### Bug Fixes
5+
6+
* **reactive_chart:** fix order of instantiation of onBruchEnd callback ([#376](https://github.com/elastic/elastic-charts/issues/376)) ([527d68d](https://github.com/elastic/elastic-charts/commit/527d68d)), closes [#360](https://github.com/elastic/elastic-charts/issues/360)
7+
8+
## [12.0.1](https://github.com/elastic/elastic-charts/compare/v12.0.0...v12.0.1) (2019-09-12)
9+
10+
11+
### Bug Fixes
12+
13+
* **theme:** fix grid position check ([#373](https://github.com/elastic/elastic-charts/issues/373)) ([af4805f](https://github.com/elastic/elastic-charts/commit/af4805f)), closes [#372](https://github.com/elastic/elastic-charts/issues/372)
14+
115
# [12.0.0](https://github.com/elastic/elastic-charts/compare/v11.2.0...v12.0.0) (2019-09-11)
216

317

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@elastic/charts",
33
"description": "Elastic-Charts data visualization library",
4-
"version": "12.0.0",
4+
"version": "12.0.2",
55
"author": "Marco Vettorello <[email protected]>",
66
"license": "Apache-2.0",
77
"main": "dist/index.js",

src/components/react_canvas/reactive_chart.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ class Chart extends React.Component<ReactiveChartProps, ReactiveChartState> {
7676
},
7777
};
7878

79+
componentWillUnmount() {
80+
window.removeEventListener('mouseup', this.onEndBrushing);
81+
}
82+
7983
renderBarSeries = (clippings: ContainerConfig): ReactiveChartElementIndex[] => {
8084
const { geometries, canDataBeAnimated, chartTheme } = this.props.chartStore!;
8185
if (!geometries) {
@@ -292,8 +296,6 @@ class Chart extends React.Component<ReactiveChartProps, ReactiveChartState> {
292296
let y = 0;
293297
let width = 0;
294298
let height = 0;
295-
// x = {chartDimensions.left + chartTransform.x};
296-
// y = {chartDimensions.top + chartTransform.y};
297299
if (chartRotation === 0 || chartRotation === 180) {
298300
x = brushStart.x;
299301
y = chartDimensions.top + chartTransform.y;
@@ -320,12 +322,17 @@ class Chart extends React.Component<ReactiveChartProps, ReactiveChartState> {
320322
onEndBrushing = () => {
321323
window.removeEventListener('mouseup', this.onEndBrushing);
322324
const { brushStart, brushEnd } = this.state;
323-
this.props.chartStore!.onBrushEnd(brushStart, brushEnd);
324-
this.setState(() => ({
325-
brushing: false,
326-
brushStart: { x: 0, y: 0 },
327-
brushEnd: { x: 0, y: 0 },
328-
}));
325+
326+
this.setState(
327+
() => ({
328+
brushing: false,
329+
brushStart: { x: 0, y: 0 },
330+
brushEnd: { x: 0, y: 0 },
331+
}),
332+
() => {
333+
this.props.chartStore!.onBrushEnd(brushStart, brushEnd);
334+
},
335+
);
329336
};
330337
onBrushing = (event: { evt: MouseEvent }) => {
331338
if (!this.state.brushing) {

0 commit comments

Comments
 (0)