Skip to content
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

Merged
merged 2 commits into from
Nov 29, 2016

Conversation

andricDu
Copy link
Collaborator

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.

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.
@andricDu
Copy link
Collaborator Author

@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');
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

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;
Copy link
Collaborator

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) {

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@andricDu andricDu merged commit 96e5e8a into develop Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants