kdeloach / react-lineto

Draw a line between two elements in React
MIT License
234 stars 63 forks source link

zIndex and within not properly working #35

Closed vtarelkin closed 4 years ago

vtarelkin commented 4 years ago

good day!

I have a react-leaflet-map and a react-bootstrap-table2 inside rc-tabs component. While I hover on the row in the table I want to draw a line from some point in the row to the point on map. That works fine BUT if map is zoomed too close and the point became to be in non-visible area the line goes through components and it looks bad. I tried to set zIndex of the line by 10 and other components by 11 but with no luck, it seems it doesn't affect. I also tried to use within: "class-name" but also with no luck, the behavior is strange and line hides somewhere.

Could you please provide example some tips on this?

vtarelkin commented 4 years ago

@kdeloach please, take a look

vtarelkin commented 4 years ago

fixed it other way - forced map not to draw a line if the object is out of bounds