import { EventHandler , EventProvider } from '../eventhandler' ; import { Invalidate } from '../renderer' ; export class TestNavigation { protected _eventHandler : EventHandler ; protected _altered = false ; constructor ( invalidate , eventProvider ) { this . _eventHandler = new EventHandler ( invalidate , eventProvider ) ; this . _eventHandler . pushMouseEnterHandler ( ( latests , previous ) => this . onMouseEnter ( latests , previous ) ) ; this . _eventHandler . pushMouseLeaveHandler ( ( latests , previous ) => this . onMouseLeave ( latests , previous ) ) ; } protected onMouseEnter ( latests , previous ) { this . _altered = false ; } protected onMouseLeave ( latests , previous ) { this . _altered = true ; } update ( ) { this . _eventHandler . update ( ) ; } reset ( ) { this . _altered = false ; } get altered ( ) : boolean { return this . _altered ; } }