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

fire over/out events on group items #5920

Closed
kumayato opened this issue Oct 11, 2019 · 2 comments
Closed

fire over/out events on group items #5920

kumayato opened this issue Oct 11, 2019 · 2 comments

Comments

@kumayato
Copy link

I have a question that is the same as #4115.
circle_group is a group, circle_group contains several nav_item.
I want to listen for mouseover and mouseout events when the mouse moves to the nav_item.
I don't know how to use the function _fireOverOutEvents.
Once run this.canvas._fireOverOutEvents(nav_item),nav_item to fire "mouseover" event immediately,but at this time,did not move to the nav_item.
I don't know how to use the function _fireOverOutEvents.
Get a reply would be greatly appreciated.

const circle_group = this.canvas.getObjects('group');
circle_group[0].forEachObject(nav_item => {
   nav_item.on('mouseover', () => {
   })
})
circle_group[0].forEachObject(nav_item => {
   this.canvas._fireOverOutEvents(nav_item);
})
@asturur
Copy link
Member

asturur commented Oct 27, 2019

_fireOverOutEvents is a private method, you should not use it.

I think we have no mouse over/out for items of group.

The actual logic of mouse over/out can handle just one object at time, hovering on a item of a group would mean to hover both the group and the item but the code cannot account for that yet, things get also more complicated when you go with deep nesting.

This does not mean that it cannot be implemented, just that as today it does not work.

@asturur asturur changed the title How to use functions _fireOverOutEvents fire over/out events on group items Oct 27, 2019
@asturur
Copy link
Member

asturur commented Oct 27, 2019

duplicate of #4115

@asturur asturur closed this as completed Oct 27, 2019
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