Clean up Cornerstone enabledElements in thumbnails (LT-251)
This commit is contained in:
parent
bd7c847443
commit
bbcbc93510
@ -1,8 +1,6 @@
|
||||
const worklistContentId = 'worklistTab';
|
||||
let lastContentId;
|
||||
|
||||
// Test
|
||||
|
||||
// Define the ViewerData global object
|
||||
// If there is currently any Session data for this object,
|
||||
// use this to repopulate the variable
|
||||
|
||||
@ -70,5 +70,4 @@ img.logoImage
|
||||
.viewerContainer
|
||||
.loadingTextDiv
|
||||
color: $textSecondaryColor
|
||||
font-size: 30px
|
||||
font-weight: 200
|
||||
font-size: 30px
|
||||
@ -12,13 +12,13 @@ Template.imageThumbnail.onRendered(() => {
|
||||
// Disable cornerstone for thumbnail element and remove its canvas
|
||||
cornerstone.disable(element);
|
||||
|
||||
// Enable cornerstone for thumbnail element angain creating a new canvas
|
||||
// Enable cornerstone for thumbnail element again creating a new canvas
|
||||
cornerstone.enable(element);
|
||||
|
||||
// Get the image ID
|
||||
const stack = instance.data.thumbnail.stack;
|
||||
const imageInstance = stack.images[0];
|
||||
const thumbnailIndex = instance.data.thumbnail.thumbnailIndex;
|
||||
const imageInstance = stack.images[0];
|
||||
const imageId = getImageId(imageInstance);
|
||||
|
||||
// Activate the loading state
|
||||
@ -59,6 +59,17 @@ Template.imageThumbnail.onRendered(() => {
|
||||
});
|
||||
});
|
||||
|
||||
Template.imageThumbnail.onDestroyed(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
// Declare DOM and jQuery objects
|
||||
const $parent = instance.$('.imageThumbnail');
|
||||
const $element = $parent.find('.imageThumbnailCanvas');
|
||||
const element = $element.get(0);
|
||||
|
||||
cornerstone.disable(element);
|
||||
});
|
||||
|
||||
Template.imageThumbnail.helpers({
|
||||
// Executed every time the image loading progress is changed
|
||||
percentComplete() {
|
||||
|
||||
@ -211,9 +211,11 @@ Template.thumbnailEntry.events({
|
||||
const data = instance.data.thumbnail.stack;
|
||||
instance.isDragAndDrop && thumbnailDragStartHandler(event, data);
|
||||
},
|
||||
|
||||
'touchmove .thumbnailEntry'(event, instance) {
|
||||
instance.isDragAndDrop && thumbnailDragHandler(event);
|
||||
},
|
||||
|
||||
'touchend .thumbnailEntry'(event, instance) {
|
||||
const data = instance.data.thumbnail.stack;
|
||||
instance.isDragAndDrop && thumbnailDragEndHandler(event, data);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user