Improvements for imageSlider and cineDialog components. Rolling back default protocol (HP) configurations

This commit is contained in:
Eloízio Salgado 2017-02-08 16:54:32 -02:00
parent 4afe74172e
commit 5d5df29e09
3 changed files with 5 additions and 6 deletions

View File

@ -5,7 +5,7 @@ function getDefaultProtocol() {
var oneByOne = new HP.ViewportStructure('grid', {
rows: 1,
columns: 2
columns: 1
});
var viewport = new HP.Viewport();

View File

@ -268,7 +268,7 @@ Template.cineDialog.events({
}
},
'input [data-key=framesPerSecond] input'(event, instance) {
'input [data-key=framesPerSecond] input, change [data-key=framesPerSecond] input'(event, instance) {
// Update the FPS text onscreen
const rate = parseFloat($(event.currentTarget).val());
instance.updateFramerate(rate);

View File

@ -19,13 +19,10 @@ Template.imageControls.onRendered(() => {
})
Template.imageControls.events({
'keydown #imageSlider'(event) {
'keydown input[type=range]'(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,
@ -34,8 +31,10 @@ Template.imageControls.events({
if (event.which === keys.DOWN) {
OHIF.viewer.hotkeyFunctions.scrollDown();
event.preventDefault();
} else if (event.which === keys.UP) {
OHIF.viewer.hotkeyFunctions.scrollUp();
event.preventDefault();
}
},
'input input[type=range], change input[type=range]'(event) {