From 1f8eda7b824f27787a4a9a0bd20a973e7a459ff8 Mon Sep 17 00:00:00 2001 From: Bruno Alves de Faria Date: Mon, 17 Apr 2017 16:50:10 -0300 Subject: [PATCH] Creating ohif:compatibility package to enable IE11 support --- LesionTracker/.meteor/packages | 1 + LesionTracker/.meteor/versions | 1 + OHIFViewer/.meteor/packages | 1 + OHIFViewer/.meteor/versions | 1 + Packages/ohif-compatibility/client/ie.js | 11 + Packages/ohif-compatibility/client/index.js | 1 + Packages/ohif-compatibility/package.js | 19 + .../public/js/svgxuse.min.js | 12 + .../public/js/typedarray.js | 1048 +++++++++++++++++ .../client/cornerstoneWADOImageLoader.js | 21 +- .../client/lib/classes/MetadataProvider.js | 18 +- .../StandaloneViewer/.meteor/packages | 1 + .../StandaloneViewer/.meteor/versions | 1 + 13 files changed, 1116 insertions(+), 20 deletions(-) create mode 100644 Packages/ohif-compatibility/client/ie.js create mode 100644 Packages/ohif-compatibility/client/index.js create mode 100644 Packages/ohif-compatibility/package.js create mode 100644 Packages/ohif-compatibility/public/js/svgxuse.min.js create mode 100644 Packages/ohif-compatibility/public/js/typedarray.js diff --git a/LesionTracker/.meteor/packages b/LesionTracker/.meteor/packages index 42d6f3ada..0c296b2aa 100644 --- a/LesionTracker/.meteor/packages +++ b/LesionTracker/.meteor/packages @@ -26,6 +26,7 @@ clinical:hipaa-logger aldeed:simple-schema # Third party package to deal with schemas # OHIF Packages +ohif:compatibility ohif:design ohif:core ohif:user diff --git a/LesionTracker/.meteor/versions b/LesionTracker/.meteor/versions index b516c29db..80752cf78 100644 --- a/LesionTracker/.meteor/versions +++ b/LesionTracker/.meteor/versions @@ -87,6 +87,7 @@ natestrauser:select2@4.0.3 npm-bcrypt@0.9.2 npm-mongo@2.2.11_2 observe-sequence@1.0.14 +ohif:compatibility@0.0.1 ohif:core@0.0.1 ohif:cornerstone@0.0.1 ohif:design@0.0.1 diff --git a/OHIFViewer/.meteor/packages b/OHIFViewer/.meteor/packages index be53e635a..894146dd8 100644 --- a/OHIFViewer/.meteor/packages +++ b/OHIFViewer/.meteor/packages @@ -5,6 +5,7 @@ # but you can also edit it by hand. # OHIF Packages +ohif:compatibility ohif:design ohif:core ohif:header diff --git a/OHIFViewer/.meteor/versions b/OHIFViewer/.meteor/versions index a396f65f1..f7aaec4d2 100644 --- a/OHIFViewer/.meteor/versions +++ b/OHIFViewer/.meteor/versions @@ -72,6 +72,7 @@ mongo-id@1.0.6 natestrauser:select2@4.0.3 npm-mongo@2.2.11_2 observe-sequence@1.0.14 +ohif:compatibility@0.0.1 ohif:core@0.0.1 ohif:cornerstone@0.0.1 ohif:design@0.0.1 diff --git a/Packages/ohif-compatibility/client/ie.js b/Packages/ohif-compatibility/client/ie.js new file mode 100644 index 000000000..a6ba92caf --- /dev/null +++ b/Packages/ohif-compatibility/client/ie.js @@ -0,0 +1,11 @@ +/* jshint -W060 */ +// Check if browser is IE and add the polyfill scripts +if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { + const writeScript = fileName => { + const src = `/packages/ohif_compatibility/public/js/${fileName}`; + document.write(`