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

Text.intersects method not working, getAllIntersections not working for Text shape #224

Closed
septembermd opened this issue Apr 15, 2017 · 1 comment

Comments

@septembermd
Copy link

septembermd commented Apr 15, 2017

My usecase:
I have a transparent layer on top of image and text elements.
I use const intersections = stage.getAllIntersections(stage.getPointerPosition()) then I delegate mouse events to elements returned by this method like this

intersections.forEach((el) => {
      if (el.getParent().getClassName() === 'Group') {
        el.fire(e.type, {type: e.type, target: el, evt: e.evt}, true);
      }
});

Everything works as expected for image. But seems like getAllIntersections dont work with Text shapes.
Also I tried
textShape.intersects(stage.getPointerPosition()))
and this method doesnt work as well.

@lavrton
Copy link
Member

lavrton commented Apr 21, 2017

Fixed. Thanks for report.

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

2 participants