Fixes for activeViewport reactivity

This commit is contained in:
Erik Ziegler committed 2015-10-22 11:12:20 +02:00
1 parent 3e483cb7a9
commit 7f04f96222
12 files changed
+65 -48

No files matched your search

@@ -17,7 +17,7 @@ function cloneElement(element, targetId) {
return clone;
}
function thumbnailDragStartHandler(e, studies) {
function thumbnailDragStartHandler(e, data) {
// Prevent any scrolling behaviour normally caused by the original event
e.originalEvent.preventDefault();
@@ -28,9 +28,10 @@ function thumbnailDragStartHandler(e, studies) {
// Store this data for use during drag and drop
OHIF.viewer.dragAndDropData = {
studyInstanceUid: imageThumbnail.data('studyInstanceUid'),
seriesInstanceUid: imageThumbnail.data('seriesInstanceUid'),
studies: studies
seriesInstanceUid: imageThumbnail.data('seriesInstanceUid')
};
$.extend(OHIF.viewer.dragAndDropData, data);
// Clone the image thumbnail
var targetId = targetThumbnail.id + 'DragClone';
@@ -202,8 +203,8 @@ Template.thumbnailEntry.onRendered(function() {
Template.thumbnailEntry.events({
// Touch drag/drop events
'touchstart .thumbnailEntry, mousedown .thumbnailEntry': function(e) {
var studies = Template.parentData(2).studies;
thumbnailDragStartHandler(e, studies);
var data = Template.parentData(2);
thumbnailDragStartHandler(e, data);
},
'touchmove .thumbnailEntry': function(e) {
thumbnailDragHandler(e, e.currentTarget);