Skip to content

Commit

Permalink
Resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed Nov 24, 2020
1 parent 24e66c0 commit b263727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
*/

import { Subject } from 'rxjs';
import { PointerEvent } from '@elastic/charts';

export const ACTIVE_CURSOR = 'ACTIVE_CURSOR';

interface ActiveCursor {
cursor: any;
}

export const activeCursor$ = new Subject<ActiveCursor>();
export const activeCursor$ = new Subject<PointerEvent>();
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const generateAnnotationData = (values, formatter) =>
const decorateFormatter = (formatter) => ({ value }) => formatter(value);

const handleCursorUpdate = (cursor) => {
activeCursor$.next({ cursor });
activeCursor$.next(cursor);
};

export const TimeSeries = ({
Expand All @@ -73,8 +73,8 @@ export const TimeSeries = ({
const chartRef = useRef();

useEffect(() => {
const updateCursor = ({ cursor }) => {
if (chartRef.current && cursor) {
const updateCursor = (cursor) => {
if (chartRef.current) {
chartRef.current.dispatchExternalPointerEvent(cursor);
}
};
Expand Down

0 comments on commit b263727

Please sign in to comment.