Skip to content
Snippets Groups Projects
Commit bc1e9bce authored by Bucknell, Mary S.'s avatar Bucknell, Mary S.
Browse files

Need to clean up by the focus circle is there!

parent f4a1e9cd
No related branches found
No related tags found
No related merge requests found
......@@ -107,9 +107,11 @@ export const getCursorEpochTime = createSelector(
getObservationsCursorOffset,
getXScale,
(cursorOffset, xScale) => {
console.log('Cursor offset is: ' + cursorOffset)
if (!cursorOffset) {
return null;
}
console.log('Epoch time is: ' + xScale.domain()[0] + cursorOffset)
return xScale.domain()[0] + cursorOffset;
}
);
......@@ -121,6 +123,7 @@ export const getDataAtCursor = createSelector(
getCursorEpochTime,
getCurrentTimeSeriesPoints,
(cursorEpochTime, points)=> {
console.log('In getDataAtCursor ' + cursorEpochTime)
if (!cursorEpochTime) {
return null;
}
......@@ -137,11 +140,12 @@ export const getCursorPoint = createSelector(
getYScale,
(point, xScale, yScale) => {
if (!point) {
return null;
return [];
}
return {
console.log(`in getCursorPoint for ${point.dateTime} and ${point.value}`);
return [{
x: xScale(point.dateTime),
y: yScale(point.value)
};
}];
}
);
......@@ -11,7 +11,7 @@ import {getCursorPoint} from './selectors/time-series-data';
export const createTooltipFocus = function(elem, store) {
elem
//.call(link(store, drawFocusCircles, getCursorPoint))
.call(link(store, drawFocusCircles, getCursorPoint))
.call(link(
store,
drawFocusOverlay,
......
......@@ -473,6 +473,7 @@ export const Actions = {
* @param {Number} cursorOffset - difference in epoch time from the start of the graph to the position of of the cursor
*/
setDailyValueCursorOffset(cursorOffset) {
console.log('setting daily value cursor offset: ' + cursorOffset);
return {
type: 'SET_DAILY_VALUE_CURSOR_OFFSET',
cursorOffset
......
......@@ -24,7 +24,7 @@ export const observationsStateReducer = function(observationsState={}, action) {
switch (action.type) {
case 'SET_CURRENT_TIME_SERIES_ID':
return setCurrentTimeSeriesId(observationsState, action);
case 'SET_DAILY_VALUE_CURSOR_EPOCH_TIME':
case 'SET_DAILY_VALUE_CURSOR_OFFSET':
return setDailyValueCursorOffset(observationsState, action);
default:
return observationsState;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment