Added hotkey support to viewerbase

This commit is contained in:
Erik Ziegler committed 2015-12-09 15:48:24 +01:00
1 parent a005e5b359
commit da3101be93
59 files changed
+1002 -71

No files matched your search

@@ -0,0 +1,20 @@
setActiveViewport = function(element) {
if (!element) {
return;
}
var viewportIndex = $('.imageViewerViewport').index(element);
// When an ActivateViewport event is fired, update the Meteor Session
// with the viewport index that it was fired from.
Session.set("activeViewport", viewportIndex);
// Add the 'active' class to the parent container to highlight the active viewport
$('#imageViewerViewports .viewportContainer').removeClass('active');
$(element).parents('.viewportContainer').addClass('active');
// Finally, enable stack prefetching and hide the reference lines from
// the newly activated viewport
enablePrefetchOnElement(element);
displayReferenceLines(element);
};