Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Hiding Tip Blocks Content Behind It #42

Closed
manassra opened this issue Jan 25, 2014 · 7 comments
Closed

Hiding Tip Blocks Content Behind It #42

manassra opened this issue Jan 25, 2014 · 7 comments

Comments

@manassra
Copy link

Looking at the source code, tip.hide() sets the opacity of the tip to 0.0, but does not actually hide it from the web page. This works fine for some cases. However, the tip while invisible still blocks the content below it, and one cannot mouseover an SVG element that lies behind the hidden tip, for example. Shouldn't a variant of 'display: none' be used instead?

@khoussem
Copy link

there is the 'pointer-events': 'none', witch disable any cursor event handler, so I think tip.hide() should work just fine

@manassra
Copy link
Author

But would that pass mouseover and click events to nodes lying behind it?

@khoussem
Copy link

yes, I made some tests and everything seems to work just fine, do you have an example where it did not?

@manassra
Copy link
Author

Interesting. I have inspected the tip more closely, and when it is hidden, the css property pointer-events: none is not apparent. Would it be the case that I am using an outdated version of the d3-tip?

I am currently using this <script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.min.js"></script>

@khoussem
Copy link

I am using the same version, and I don't have the problem. here is an example of the tag's style after being hidden:
style="left: 680.55px; top: 844.58px; position: absolute; opacity: 0; pointer-events: none;"

@manassra
Copy link
Author

I ended up cloning this repo and using this source code instead. I am not having this issue anymore. It might have been a caching problem or something related to a bug in the minified version. Thanks!

@caged
Copy link
Owner

caged commented Feb 2, 2014

The code you were using was an older version. This should be fixed in versions >= v0.6.1.

@caged caged closed this as completed Feb 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants