no event (mousedown, mouseup, mousemove) will fire on lines (unless their path is opened)
See original GitHub issueHere’s the thing:
I create a line:
new Graphics()
interactive = true
buttonMode = true
beginFill()
lineStyle()
moveTo(50, 50)
lineTo(150, 150)
endFill()
stage.addChild( line )
at this point: I can drag the line, but something’s not right, cause I can drag the line even If I click not on the line itself, but to the left of it, or to the right. (it’s like its path is open or something)
Okey that’s not useful, So I try to close the line:
moveTo(50, 50)
lineTo(150, 150)
lineTo(50, 50)
But now, Its interactive ness and buttonMode ness is gone.
What’s happening here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (4 by maintainers)
Top Results From Across the Web
no event (mousedown, mouseup, mousemove) will fire on ...
Here's the thing: I create a line: new Graphics() interactive = true buttonMode = true beginFill() lineStyle() moveTo(50, 50) lineTo(150, ...
Read more >Element: mousemove event - Web APIs | MDN
The mousemove event is fired at an element when a pointing device (usually a mouse) is moved while the cursor's hotspot is inside...
Read more >Events-- 'mouseup' not firing after mousemove - Stack Overflow
The event which you want to fire in mouseup , You can fire in mousedown and inside the function write event.stopPropagation() .
Read more >161464 - Click event also triggers mousemove (even if mouse ...
But NOT receiving mouseup/mousedown when you should, or ANY state that survives closing/opening the tab is something much more serious. I guess there's...
Read more >Mouse events - The Modern JavaScript Tutorial
Every mouse move over an element triggers that event. click: Triggers after mousedown and then mouseup over the same element if the left...
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

The line is centered on the shape’s bounds - so half of the line is inside the bounds, half of the line is outside the bounds. Only the part of the line that is inside the bounds is clickable.
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.