ige icon indicating copy to clipboard operation
ige copied to clipboard

Mouseover/out events do not trigger properly from composite cached entities

Open beyond-code-github opened this issue 6 years ago • 2 comments

When composite caching is turned on, I've found that some mouse events don't fire. I think the root cause of the issue is that this code in the IgeEntity tick method... https://github.com/Irrelon/ige/blob/stable/engine/core/IgeEntity.js#L1653

...isn't invoked on children of the entity when composite caching is turned on unless the cache is dirty: https://github.com/Irrelon/ige/blob/stable/engine/core/IgeEntity.js#L1696

I was exploring to see if I could add a dontRender argument similar to the dontTransform thats there already and propagate this down the chain to children but I couldn't find a type safe way to do it as there's no guarantee that children are IgeEntity or IgeObject or something more complicated with a pre-existing overloaded tick method that this might break. (Now that I think about it, it looks like the code wouldn't support overloading the tick method on entities and even the dontTransform parameter looks like it would be ignored on children)

I also looked at _dontRender private instance field but setting this value would break encapsulation and present all manner of difficult state related issues.

Any thoughts on a good solution for this?

beyond-code-github avatar Jul 08 '18 11:07 beyond-code-github

You can see an experimental fix that works in my specific use case here if that helps to visualise the issue https://github.com/Irrelon/ige/compare/stable...beyond-code-github:master

beyond-code-github avatar Jul 08 '18 12:07 beyond-code-github

@Irrelon bumping this, any thoughts?

beyond-code-github avatar Sep 26 '18 19:09 beyond-code-github