Skip to content

Commit

Permalink
fix(visualize): More complete fix for single-click cursor focus
Browse files Browse the repository at this point in the history
Focus stem fix in #249 was not complete - short clicks did not update
the focus stem. Added an extra render for the focus stem only on
mousedown. Fixes #249 properly
  • Loading branch information
atruskie committed Feb 16, 2016
1 parent f7b54c8 commit 47a117d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/d3Bindings/eventDistribution/distributionDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,6 @@ angular
tilesGroup.attr(attrs);
tilesBackground.attr(attrs);
datasetBoundsRect.attr("height", tilesHeightPixels);
focusLine.attr("height", tilesHeightPixels + focusStemPath.root);
focusTextGroup.translate(() => [0, -(focusStemPath.root + focusStemPath.stems)]);
*/
}

Expand Down Expand Up @@ -1271,10 +1268,13 @@ angular
// HACK: disambiguate between clicks and pans
_isZooming = $window.performance.now();
_hasMouseMoved = d3.mouse(main.node());

updateFocusDate(false);
renderFocusGroup();
}

function onClickNavigate() {
let now = $window.performance.now(),
/*let now = $window.performance.now(),
deltaTime = now - _isZooming,
newPosition = d3.mouse(main.node()),
deltaPosition = distance(newPosition, _hasMouseMoved);
Expand Down Expand Up @@ -1310,7 +1310,7 @@ angular
}
_isZooming = null;
_hasMouseMoved = null;
_hasMouseMoved = null;*/
}

/**
Expand All @@ -1321,7 +1321,7 @@ angular
console.debug("distributionDetail::onDblClick: Cancelling navigate");

// cancel the navigate from a single click
$timeout.cancel(_navigateTimeoutPromise);
//$timeout.cancel(_navigateTimeoutPromise);
}

function updateFocusDate(fromMiddle) {
Expand Down

0 comments on commit 47a117d

Please sign in to comment.