File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ class Keyboard extends Disposable {
2929 this . isEnabled_ = true ;
3030
3131 events . listen (
32- this . shortcuts_ ,
32+ this . shortcuts_ ,
3333 KeyboardShortcutHandler . EventType . SHORTCUT_TRIGGERED ,
34- this . handleKeyboardShortcut ,
35- false ,
34+ this . handleKeyboardShortcut ,
35+ false ,
3636 this ) ;
3737
3838 /** @private @const @type {!Map<string,!Shortcut> } */
@@ -84,10 +84,18 @@ class Keyboard extends Disposable {
8484 this . shortcutMap_ . clear ( ) ;
8585 }
8686
87- /**
88- * Enable/disable the shotcuts globally.
89- * @param {boolean } b
90- */
87+ /**
88+ * Return the isEnabled flag.
89+ * @return {boolean }
90+ */
91+ isEnabled ( ) {
92+ return this . isEnabled_ ;
93+ }
94+
95+ /**
96+ * Enable/disable the shotcuts globally.
97+ * @param {boolean } b
98+ */
9199 setEnabled ( b ) {
92100 this . shortcuts_ . unregisterAll ( ) ;
93101 if ( b ) {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class Router extends EventTarget {
6767 //console.log('go: ' + path);
6868 asserts . assertString ( path , 'Routing path must be a string' ) ;
6969 if ( this . route_ ) {
70- console . warn ( `cannot route to ${ path } due to existing route` , this . route_ ) ;
70+ console . warn ( `cannot route to ${ path } due to existing route " ${ this . route_ . matchedPath ( ) } " --> " ${ this . route_ . unmatchedPath ( ) } "` ) ;
7171 return Promise_ . reject (
7272 'Already routing to ' + this . route_ . getPath ( )
7373 ) ;
You can’t perform that action at this time.
0 commit comments