Move ohif:hotkeys into ohif:core
This commit is contained in:
1 parent
1abd0e6f9d
commit
184c959037
10 files changed
+14
-1
No files matched your search
@@ -12,3 +12,16 @@ if (Meteor.isDevelopment) {
|
||||
this.render('componentPlayground');
|
||||
});
|
||||
}
|
||||
|
||||
import { hotkeys } from 'meteor/ohif:hotkeys';
|
||||
|
||||
Router.onBeforeAction(function() {
|
||||
const lastRoute = Session.get('lastRoute');
|
||||
const currentRoute = this.router.current().route.getName();
|
||||
if (currentRoute !== lastRoute) {
|
||||
hotkeys.switchToContext(null);
|
||||
Session.set('lastRoute', currentRoute);
|
||||
}
|
||||
|
||||
this.next();
|
||||
});
|
||||
Reference in new issue
Block a user