Skip to content

Commit

Permalink
Update Cornerstone libraries and use injection for $, Hammer, and Cor…
Browse files Browse the repository at this point in the history
…nerstone
  • Loading branch information
swederik committed Oct 26, 2017
1 parent 315ec93 commit 012bba4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions Packages/ohif-cornerstone/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@ import * as cornerstoneTools from 'cornerstone-tools';
import * as cornerstoneMath from 'cornerstone-math';
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
import * as dicomParser from 'dicom-parser';
import { $ } from 'meteor/jquery';
import Hammer from 'hammerjs';

import './client/'; // which is actually: import './client/index.js';

// Inject the current cornerstone version into the
// WADO Image Loader and Tools libraries
//
// Note: You would also need to do this with Cornerstone Web Image Loader
cornerstone.external.$ = $;
cornerstoneTools.external.$ = $;
cornerstoneTools.external.Hammer = Hammer;
cornerstoneTools.external.cornerstone = cornerstone;
cornerstoneWADOImageLoader.external.cornerstone = cornerstone;

export {
cornerstone,
cornerstoneTools,
Expand Down
8 changes: 4 additions & 4 deletions Packages/ohif-cornerstone/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Package.describe({
Npm.depends({
hammerjs: '2.0.8',
'jquery-hammerjs': '2.0.0',
'cornerstone-core': '0.12.2',
'cornerstone-tools': '0.9.0',
'cornerstone-core': '0.13.2',
'cornerstone-tools': '0.10.0',
'cornerstone-math': '0.1.6',
'dicom-parser': '1.7.5',
'cornerstone-wado-image-loader': '0.14.7'
'cornerstone-wado-image-loader': '0.15.1'
});

Package.onUse(function(api) {
Expand All @@ -23,7 +23,7 @@ Package.onUse(function(api) {

api.addAssets('public/js/cornerstoneWADOImageLoaderCodecs.es5.js', 'client');
api.addAssets('public/js/cornerstoneWADOImageLoaderWebWorker.es5.js', 'client');
api.addAssets('public/js/cornerstoneWADOImageLoaderWebWorker.min.js.map', 'client');
api.addAssets('public/js/cornerstoneWADOImageLoaderWebWorker.es5.js.map', 'client');

api.mainModule('main.js', 'client');

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

0 comments on commit 012bba4

Please sign in to comment.