Renaming ohif:compatibility package to ohif:polyfill
This commit is contained in:
1 parent
872b0e8107
commit
2c0fbc0158
12 files changed
+8
-8
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { $ } from 'meteor/jquery';
|
||||
|
||||
/* 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(`<script src="${src}"><\/script>`);
|
||||
};
|
||||
|
||||
writeScript('svgxuse.min.js');
|
||||
writeScript('typedarray.min.js');
|
||||
writeScript('flexibility.min.js');
|
||||
|
||||
window.addEventListener('click', event => {
|
||||
if (!window.SVGElementInstance || !(event.target instanceof SVGElementInstance)) return;
|
||||
$(event.target.correspondingUseElement).trigger('click');
|
||||
}, true);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import './ie';
|
||||
Reference in new issue
Block a user