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

Mouse events aren't captured on empty parts of layer #1014

Open
pronebird opened this issue Sep 17, 2014 · 0 comments
Open

Mouse events aren't captured on empty parts of layer #1014

pronebird opened this issue Sep 17, 2014 · 0 comments

Comments

@pronebird
Copy link
Contributor

Hi,

I have a layer with shapes inside. I have to connect shapes between each other. I capture mousedown, mouseup and mousemove events. Once user clicks and holds LMB, I add connector line and two anchor points, then user moves cursor and this line extends to the cursor position.

It's all good until my cursor within bounds of any shape inside of layer, once it gets outside of bounds of first selected shape, mouse events stop coming and mouseleave event is sent.

Expected:

  1. Mouse events should be dispatched within bounds of layer regardless intersection with any child objects. My layer has dimensions set so its bounds are certain.
  2. mouseleave event dispatched when mouse leaves bounds of layer not when it's on layer itself.

Workaround:

Put Kinetic.Rect in background of layer to keep receiving events.

JSFiddle:
http://jsfiddle.net/pronebird/34zxokyw/

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

No branches or pull requests

1 participant