-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltips work for crosshair mode, and list mutations/observations. #25
Conversation
Correct behaviour when mousing over tracks and histograms. Added mutation to test page so we have an example of multiple mutations for same (donor, gene) position.
@Jephuff You are pretty familiar with the code now, mind giving it a review? |
.style('opacity', 0.9); | ||
_self.div.html(html) | ||
.style('left', (d3.event.pageX + 15) + 'px') | ||
.style('top', (d3.event.pageY + 30) + 'px'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change these to use a transform(and in the not crosshair tooltip as well)? If a parent container is position absolute or relative the tooltip could be to far from the mouse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought d3.event.page[X/Y]
was the solution for this kind of thing? Regardless of the parent container, the event emits the (x,y) of the event where it occurred in the window. At least that was my impression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, you are right. Something else weird is happening then. Ignore this comment!
var _self = this; | ||
|
||
if (donor === undefined || donor === null) return null; | ||
if (gene === undefined || donor === null) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could probably be simplified to if(!donor || !gene) return null; seeing as all falsy values should all return null.
or
if(!donor || typeof donor !== 'object') return null;
if(!gene || typeof gene !== 'object') return null;
@@ -3514,8 +3514,8 @@ OncoHistogram.prototype.renderAxis = function (topCount) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on removing the build files from git? they bloat the diffs quite a bit and for anyone needing the build from a cdn we could point them to something like unpkg.com.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I guess we should.
Correct behaviour when mousing over tracks and histograms.
Added mutation to test page so we have an example of multiple mutations for same (donor, gene) position.