Point at Leader automatically, and repaint Follower child when Leader moves (Resolves #15)
Reworks the example app so that it uses Overlords new LeaderMenuFocalPoint to orient the menu arrow towards the Leader. The example app is no longer responsible for tracking the Leader's global offset and reporting it to the popover menu.
The LeaderLink now notifies listeners whenever the Leader's size or offset changes. Follower widgets now have a boolean property called repaintWhenLeaderChanges. When that property is true, the Follower will mark the child widget as needing to repaint whenever the LeaderLink changes. This change is needed because Followers such as menus with arrows need to paint based on the Leader location, and moving the Leader won't necessary rebuild a Follower. Therefore, the Follower needs an opportunity to repaint outside the standard widget tree rebuild process.
Point at Leader automatically, and repaint Follower child when Leader moves (Resolves #15)
Reworks the example app so that it uses
Overlords
newLeaderMenuFocalPoint
to orient the menu arrow towards theLeader
. The example app is no longer responsible for tracking theLeader
's global offset and reporting it to the popover menu.The
LeaderLink
now notifies listeners whenever theLeader
's size or offset changes.Follower
widgets now have a boolean property calledrepaintWhenLeaderChanges
. When that property istrue
, theFollower
will mark the child widget as needing to repaint whenever theLeaderLink
changes. This change is needed becauseFollower
s such as menus with arrows need to paint based on theLeader
location, and moving theLeader
won't necessary rebuild aFollower
. Therefore, theFollower
needs an opportunity to repaint outside the standard widget tree rebuild process.