ethstats-server/web-app/.meteor/local/build/programs/web.browser/packages/launch-screen.js.map
2015-08-14 19:22:53 +02:00

2 lines
2.9 KiB
Plaintext

)]}'
{"version":3,"sources":["launch-screen/mobile-launch-screen.js","launch-screen/default-behavior.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sE;AACA,iD;;AAEA,kB;AACA,0B;;AAEA,gB;AACA,qB;AACA,6B;AACA,c;AACA,2C;AACA,Q;AACA,K;;AAEA,wB;AACA,mE;AACA,K;;AAEA,gB;;AAEA,yB;AACA,+B;AACA,6B;AACA,e;;AAEA,uB;AACA,oB;AACA,8B;AACA,yE;AACA,+B;AACA,wC;AACA,S;AACA,O;AACA,M;;AAEA,2D;AACA,Y;AACA,sB;AACA,M;AACA,G;AACA,E;;;;;;;;;;;;;;;;;;;ACxCA,qE;AACA,sE;AACA,8D;AACA,W;AACA,iC;;AAEA,iE;;AAEA,4B;AACA,mB;AACA,qB;AACA,sC;AACA,6D;AACA,uD;AACA,0D;AACA,oD;AACA,6D;AACA,uB;AACA,O;AACA,U;AACA,0C;AACA,uB;AACA,O;;AAEA,qE;AACA,+D;AACA,kE;AACA,+D;AACA,uC;AACA,4B;AACA,uB;AACA,a;AACA,G;AACA,G","file":"/packages/launch-screen.js","sourcesContent":["// XXX This currently implements loading screens for mobile apps only,\n// but in the future can be expanded to all apps.\n\nvar holdCount = 0;\nvar alreadyHidden = false;\n\nLaunchScreen = {\n hold: function () {\n if (! Meteor.isCordova) {\n return {\n release: function () { /* noop */ }\n };\n }\n\n if (alreadyHidden) {\n throw new Error(\"Can't show launch screen once it's hidden\");\n }\n\n holdCount++;\n\n var released = false;\n var release = function () {\n if (! Meteor.isCordova)\n return;\n\n if (! released) {\n holdCount--;\n if (holdCount === 0 &&\n typeof navigator !== 'undefined' && navigator.splashscreen) {\n alreadyHidden = true;\n navigator.splashscreen.hide();\n }\n }\n };\n\n // Returns a launch screen handle with a release method\n return {\n release: release\n };\n }\n};\n","// Hold launch screen on app load. This reflects the fact that Meteor\n// mobile apps that use this package always start with a launch screen\n// visible. (see XXX comment at the top of package.js for more\n// details)\nvar handle = LaunchScreen.hold();\n\nvar Template = Package.templating && Package.templating.Template;\n\nMeteor.startup(function () {\n if (! Template) {\n handle.release();\n } else if (Package['iron:router']) {\n // XXX Instead of doing this here, this code should be in\n // iron:router directly. Note that since we're in a\n // `Meteor.startup` block it's ok that we don't have a\n // weak dependency on iron:router in package.js.\n Package['iron:router'].Router.onAfterAction(function () {\n handle.release();\n });\n } else {\n Template.body.onRendered(function () {\n handle.release();\n });\n\n // In case `Template.body` never gets rendered (due to some bug),\n // hide the launch screen after 6 seconds. This matches the\n // observed timeout that Cordova apps on Android (but not iOS)\n // have on hiding the launch screen (even if you don't call\n // `navigator.splashscreen.hide()`)\n setTimeout(function () {\n handle.release();\n }, 6000);\n }\n});\n"]}