Dynamic width and hover/click
See original GitHub issueHi, and thanks for this lib. I try to add interactivity on marker (click and mouse hover) but I have a problem, It doesn’t work when marker size is dynamic. Here is the Marker class :
class Marker extends Component {
static propTypes = {
lat: PropTypes.number,
lng: PropTypes.number,
text: PropTypes.string
}
render() {
let {text, key} = this.props
const {w, h} = meters2ScreenPixels(300, {lat: this.props.lat, lng: this.props.lng}, mapZoom);
return (
<div
key={key}
style={{
width: w,
height: h,
fontSize: w/2
}}
className="estima-marker">
{text}
</div>
)
}
}
I w
and h
are constant, the event onChildClick
works, but if I use meters2ScreenPixels
, it does not works. The hover zone is still here but not match to the marker overlay.
How can I do that ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
css - Less - Dynamic width of element on :hover and another ...
Now the question: I need the left side on css :hover event to get width: 30%, and right side accordingly: width: 70%.
Read more >How hovering over a division element to gradually change the ...
You can use transition property in CSS to make some transition effect as changing the width of an element. The transition effect can...
Read more >HTML CSS CSS Widget Hover - Java2s.com
Click the following links for the tutorial for CSS Widget and Hover. Make element fly in with mouse hover with dynamic width ·...
Read more >Create a Hover Button in a React App | Pluralsight
We will see two methods of creating a hover button: using pure CSS and using ... App { 6 display: flex; 7} 8...
Read more >Button | Webflow University
You can adjust the size of the button by changing its width and height in Style ... Now when you click back into...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok thanks for explanations and responsiveness 😃
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.