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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
import { HotkeysManager } from 'meteor/ohif:hotkeys/client/classes/HotkeysManager';
|
import { HotkeysManager } from '/client/classes/HotkeysManager';
|
||||||
import 'jquery.hotkeys';
|
import 'jquery.hotkeys';
|
||||||
|
|
||||||
// Create hotkeys namespace using a HotkeysManager class instance
|
// Create hotkeys namespace using a HotkeysManager class instance
|
||||||
@@ -12,3 +12,16 @@ if (Meteor.isDevelopment) {
|
|||||||
this.render('componentPlayground');
|
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