monarch-initiative / phenogrid

The phenogrid widget
13 stars 14 forks source link

Further tooltip tweak per request discussed in PR #201 #202

Closed yuanzhou closed 8 years ago

yuanzhou commented 8 years ago
  1. Added pg_tooltip_inner to create a 5px padding between the pg_tooltip (container) and pg_tooltip_inner (actual look of tooltip)
  2. Tweaked the magic numbers for tooltip container position

Now the tooltip still shows up even if our mouse/cursor is slightly (within 5px) out the tooltip.

I couldn't capture a screenshot to show the effect since the cursor gets lost when the screenshot is being captured.

@harryhoch please test and merge. Thanks!

yuanzhou commented 8 years ago

Things to do after this PR gets merged:

  1. I'll go to master branch update the npm package version to 1.1.2 using npm version 1.1.2, this will also create a git tag
  2. Push to npmjs.org
  3. Update the new version number in monarch-app
harryhoch commented 8 years ago

can we bump that buffer out to about 8 px?

yuanzhou commented 8 years ago

@harryhoch I think 8px would be too much. The grid cell is 10px wide, in this PR I tried to make the invisible overlap about 2 or 3px, otherwise if the overlap is too big, when we move mouse vertically to the next cell or Y label, the crosshairs and the new tooltip won't show up because the mouse is still on the overlap of the previous element. Under this restriction, increasing the buffer to 8px will only create a bigger whitespace between the label/cell and the visible tooltip (pg_tooltip_inner).

harryhoch commented 8 years ago

ok. let's leave it for now.