Fix image scrolling direction issue and DIMSE Server schema issue

This commit is contained in:
Erik Ziegler 2016-08-31 11:11:45 +02:00
parent 2a119a5464
commit c3d7c2af09
3 changed files with 22 additions and 3 deletions

View File

@ -40,7 +40,6 @@ clinical:router
fastclick@1.0.12 fastclick@1.0.12
standard-minifier-css@1.1.8 standard-minifier-css@1.1.8
standard-minifier-js@1.1.8 standard-minifier-js@1.1.8
aldeed:simple-schema
johdirr:meteor-git-rev johdirr:meteor-git-rev
wadoproxy wadoproxy
aldeed:template-extension aldeed:template-extension

View File

@ -16,14 +16,33 @@ Template.imageControls.onRendered(() => {
}) })
Template.imageControls.events({ Template.imageControls.events({
'input #imageSlider, change #imageSlider': function(e) { 'keydown #imageSlider'(event) {
// We don't allow direct keyboard up/down input on the
// image sliders since the natural direction is reversed (0 is at the top)
// Prevent the browser's default behaviour (scrolling)
event.preventDefault();
// Store the KeyCodes in an object for readability
const keys = {
DOWN: 40,
UP: 38
};
if (event.which === keys.DOWN) {
OHIF.viewer.hotkeyFunctions.scrollDown();
} else if (event.which === keys.UP) {
OHIF.viewer.hotkeyFunctions.scrollUp();
}
},
'input #imageSlider, change #imageSlider'(event) {
// Note that we throttle requests to prevent the // Note that we throttle requests to prevent the
// user's ultrafast scrolling from firing requests too quickly. // user's ultrafast scrolling from firing requests too quickly.
clearTimeout(slideTimeout); clearTimeout(slideTimeout);
slideTimeout = setTimeout(() => { slideTimeout = setTimeout(() => {
// Using the slider in an inactive viewport // Using the slider in an inactive viewport
// should cause that viewport to become active // should cause that viewport to become active
const slider = $(e.currentTarget); const slider = $(event.currentTarget);
const newActiveElement = slider.parents().eq(2).siblings('.imageViewerViewport').get(0); const newActiveElement = slider.parents().eq(2).siblings('.imageViewerViewport').get(0);
setActiveViewport(newActiveElement); setActiveViewport(newActiveElement);

View File

@ -86,6 +86,7 @@ export const DIMSEPeer = new SimpleSchema({
hostAE: { hostAE: {
type: String, type: String,
label: 'Application Entity (AE) Host', label: 'Application Entity (AE) Host',
optional: true
}, },
host: { host: {
type: String, type: String,