Please sign in to comment.
Fix a bug where removing a Layer's last listener broke child layers' …
…listeners. When you add a listener, a Layer makes itself and its ancestors interactive. But when you remove the last listener on a Layer, it would mark itself non-interactive. Everything's happy until you have: LayerA contains LayerB Add listener to LayerB Add listener to LayerA, disconnect LayerA's listener. Now, LayerA would mark itself non-interactive even though it was for the sake of LayerB, so you'd get the symptom of LayerB's listener going awol (until you happened to add another listener somewhere at or under LayerA, and it would spring back to life) GroupLayerImpl.hitTest() already takes care of lazily noticing that an otherwise listener-free Layer no longer has any interactive children, so let's have that handle it for this case, as well.
- Loading branch information...
Showing with 4 additions and 2 deletions.