Fixing StandaloneViewer dependencies and issues
This commit is contained in:
parent
e8d729c9b0
commit
6c98c6a589
@ -48,7 +48,7 @@ export class HotkeysManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.retrieveFunction) {
|
||||
this.retrieveFunction(contextName).then(resolve).catch(reject);
|
||||
} else if (Meteor.userId()) {
|
||||
} else if (OHIF.user) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(storageKey));
|
||||
} catch(error) {
|
||||
|
||||
@ -139,7 +139,7 @@ class WindowLevelPresetsManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (self.retrieveFunction) {
|
||||
self.retrieveFunction().then(resolve).catch(reject);
|
||||
} else if (Meteor.userId()) {
|
||||
} else if (OHIF.user) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(WL_STORAGE_KEY));
|
||||
} catch(error) {
|
||||
|
||||
@ -155,6 +155,15 @@ Meteor.startup(function() {
|
||||
});
|
||||
}
|
||||
|
||||
// Check if display sets can be moved
|
||||
const canMoveDisplaySets = isNext => {
|
||||
if (!OHIF.viewerbase.layoutManager) {
|
||||
return false;
|
||||
} else {
|
||||
return OHIF.viewerbase.layoutManager.canMoveDisplaySets(isNext);
|
||||
}
|
||||
};
|
||||
|
||||
// Register viewport navigation commands
|
||||
OHIF.commands.set(contextName, {
|
||||
scrollDown: {
|
||||
@ -176,12 +185,12 @@ Meteor.startup(function() {
|
||||
previousDisplaySet: {
|
||||
name: 'Previous Series',
|
||||
action: () => OHIF.viewerbase.layoutManager.moveDisplaySets(false),
|
||||
disabled: () => !OHIF.viewerbase.layoutManager.canMoveDisplaySets(false)
|
||||
disabled: () => !canMoveDisplaySets(false)
|
||||
},
|
||||
nextDisplaySet: {
|
||||
name: 'Next Series',
|
||||
action: () => OHIF.viewerbase.layoutManager.moveDisplaySets(true),
|
||||
disabled: () => !OHIF.viewerbase.layoutManager.canMoveDisplaySets(true)
|
||||
disabled: () => !canMoveDisplaySets(true)
|
||||
},
|
||||
nextPanel: {
|
||||
name: 'Next Panel',
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
12
StandaloneViewer/SampleClientOnlyBuild/packages/ohif_polyfill/public/js/svgxuse.min.js
vendored
Normal file
12
StandaloneViewer/SampleClientOnlyBuild/packages/ohif_polyfill/public/js/svgxuse.min.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* @copyright Copyright (c) 2017 IcoMoon.io
|
||||
* @license Licensed under MIT license
|
||||
* See https://github.com/Keyamoon/svgxuse
|
||||
* @version 1.2.4
|
||||
*/
|
||||
(function(){if("undefined"!==typeof window&&window.addEventListener){var e=Object.create(null),n,t,d=function(){clearTimeout(t);t=setTimeout(n,100)},q=function(){},u=function(){var f;window.addEventListener("resize",d,!1);window.addEventListener("orientationchange",d,!1);window.MutationObserver?(f=new MutationObserver(d),f.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),q=function(){try{f.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",
|
||||
d,!1)}catch(w){}}):(document.documentElement.addEventListener("DOMSubtreeModified",d,!1),q=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1);window.removeEventListener("resize",d,!1);window.removeEventListener("orientationchange",d,!1)})},v=function(f){function e(a){var c;void 0!==a.protocol?c=a:(c=document.createElement("a"),c.href=a);return c.protocol.replace(/:/g,"")+c.host}var d,p;window.XMLHttpRequest&&(d=new XMLHttpRequest,p=e(location),f=e(f),d=void 0===d.withCredentials&&
|
||||
""!==f&&f!==p?XDomainRequest||void 0:XMLHttpRequest);return d};n=function(){function d(){--r;0===r&&(q(),u())}function l(a){return function(){!0!==e[a.base]&&(a.isXlink?a.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a.hash):a.useEl.setAttribute("href","#"+a.hash))}}function n(a){return function(){var c=document.body,b=document.createElement("x");a.onload=null;b.innerHTML=a.responseText;if(b=b.getElementsByTagName("svg")[0])b.setAttribute("aria-hidden","true"),b.style.position=
|
||||
"absolute",b.style.width=0,b.style.height=0,b.style.overflow="hidden",c.insertBefore(b,c.firstChild);d()}}function p(a){return function(){a.onerror=null;a.ontimeout=null;d()}}var a,c,m,g,r=0,b,k=!1,h;q();h=document.getElementsByTagName("use");for(g=0;g<h.length;g+=1){try{c=h[g].getBoundingClientRect()}catch(x){c=!1}(a=h[g].getAttribute("href"))?k=!1:(a=h[g].getAttributeNS("http://www.w3.org/1999/xlink","href"),k=!0);m=a&&a.split?a.split("#"):["",""];a=m[0];m=m[1];b=c&&0===c.left&&0===c.right&&0===
|
||||
c.top&&0===c.bottom;c&&0===c.width&&0===c.height&&!b?a.length&&(b=e[a],!0!==b&&setTimeout(l({useEl:h[g],base:a,hash:m,isXlink:k}),0),void 0===b&&(k=v(a),void 0!==k&&(b=new k,e[a]=b,b.onload=n(b),b.onerror=p(b),b.ontimeout=p(b),b.open("GET",a),b.send(),r+=1))):b?a.length&&e[a]&&setTimeout(l({useEl:h[g],base:a,hash:m,isXlink:k}),0):void 0===e[a]?e[a]=!0:e[a].onload&&(e[a].abort(),delete e[a].onload,e[a]=!0)}h="";r+=1;d()};var l;l=function(){window.removeEventListener("load",l,!1);t=setTimeout(n,0)};
|
||||
"complete"!==document.readyState?window.addEventListener("load",l,!1):l()}})();
|
||||
3
StandaloneViewer/SampleClientOnlyBuild/packages/ohif_polyfill/public/js/typedarray.min.js
vendored
Normal file
3
StandaloneViewer/SampleClientOnlyBuild/packages/ohif_polyfill/public/js/typedarray.min.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/*! modernizr 3.5.0 (Custom Build) | MIT *
|
||||
* https://modernizr.com/download/?-typedarrays-setclasses !*/
|
||||
!function(n,e,s){function o(n,e){return typeof n===e}function a(){var n,e,s,a,t,r,l;for(var c in f)if(f.hasOwnProperty(c)){if(n=[],e=f[c],e.name&&(n.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(s=0;s<e.options.aliases.length;s++)n.push(e.options.aliases[s].toLowerCase());for(a=o(e.fn,"function")?e.fn():e.fn,t=0;t<n.length;t++)r=n[t],l=r.split("."),1===l.length?Modernizr[l[0]]=a:(!Modernizr[l[0]]||Modernizr[l[0]]instanceof Boolean||(Modernizr[l[0]]=new Boolean(Modernizr[l[0]])),Modernizr[l[0]][l[1]]=a),i.push((a?"":"no-")+l.join("-"))}}function t(n){var e=l.className,s=Modernizr._config.classPrefix||"";if(c&&(e=e.baseVal),Modernizr._config.enableJSClass){var o=new RegExp("(^|\\s)"+s+"no-js(\\s|$)");e=e.replace(o,"$1"+s+"js$2")}Modernizr._config.enableClasses&&(e+=" "+s+n.join(" "+s),c?l.className.baseVal=e:l.className=e)}var i=[],f=[],r={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,e){var s=this;setTimeout(function(){e(s[n])},0)},addTest:function(n,e,s){f.push({name:n,fn:e,options:s})},addAsyncTest:function(n){f.push({name:null,fn:n})}},Modernizr=function(){};Modernizr.prototype=r,Modernizr=new Modernizr,Modernizr.addTest("typedarrays","ArrayBuffer"in n);var l=e.documentElement,c="svg"===l.nodeName.toLowerCase();a(),t(i),delete r.addTest,delete r.addAsyncTest;for(var u=0;u<Modernizr._q.length;u++)Modernizr._q[u]();n.Modernizr=Modernizr}(window,document);
|
||||
@ -5,7 +5,7 @@
|
||||
"start": "meteor run"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.18.0",
|
||||
"babel-runtime": "^6.23.0",
|
||||
"meteor-node-stubs": "~0.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user