| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5" ><![endif]-->
- <!DOCTYPE html>
- <html>
- <head>
- <title>drawio文件预览</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
- <script type="text/javascript">
-
- var urlParams = (function()
- {
- var result = new Object();
- var params = window.location.search.slice(1).split('&');
-
- for (var i = 0; i < params.length; i++)
- {
- var idx = params[i].indexOf('=');
-
- if (idx > 0)
- {
- result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
- }
- }
-
- return result;
- })();
-
-
- if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
- {
- try
- {
- urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));
-
- if (urlParams.hash != null)
- {
- window.location.hash = urlParams.hash;
- }
- }
- catch (e)
- {
- // ignore
- }
- }
-
- // Global variable for desktop
- var mxIsElectron = window && window.process && window.process.type;
-
-
- /**
- * Synchronously adds scripts to the page.
- */
- function mxscript(src, onLoad, id, dataAppKey, noWrite, onError)
- {
- var defer = onLoad == null && !noWrite;
-
- if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
- onLoad != null || noWrite)
- {
- var s = document.createElement('script');
- s.setAttribute('type', 'text/javascript');
- s.setAttribute('defer', 'true');
- s.setAttribute('src', src);
- if (id != null)
- {
- s.setAttribute('id', id);
- }
-
-
-
- if (onLoad != null)
- {
- var r = false;
-
- s.onload = s.onreadystatechange = function()
- {
- if (!r && (!this.readyState || this.readyState == 'complete'))
- {
- r = true;
- onLoad();
- }
- };
- }
- if (onError != null)
- {
- s.onerror = function(e)
- {
- onError('Failed to load ' + src, e);
- };
- }
-
- var t = document.getElementsByTagName('script')[0];
-
- if (t != null)
- {
- t.parentNode.insertBefore(s, t);
- }
- }
-
- };
- /**
- * Asynchronously adds scripts to the page.
- */
- function mxinclude(src)
- {
- var g = document.createElement('script');
- g.type = 'text/javascript';
- g.async = true;
- g.src = src;
-
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(g, s);
- };
-
-
-
- // Checks for local storage
- var isLocalStorage = false;
-
- try
- {
- isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined';
- }
- catch (e)
- {
- // ignored
- }
- var mxScriptsLoaded = false, mxWinLoaded = false;
-
- function checkAllLoaded()
- {
- if (mxScriptsLoaded && mxWinLoaded)
- {
- App.main();
- }
- };
-
- var t0 = new Date();
- // Changes paths for local development environment
- if (urlParams['dev'] == '1')
- {
- mxForceIncludes = false;
- mxscript(drawDevUrl + 'js/PreConfig.js');
- mxscript(drawDevUrl + 'js/diagramly/Init.js');
- mxscript(geBasePath + '/Init.js');
- mxscript(mxBasePath + '/mxClient.js');
- mxscript(drawDevUrl + 'js/PostConfig.js');
- }
- else
- {
- (function()
- {
- var hostName = window.location.hostname;
-
- // Supported domains are *.draw.io and the packaged version in Quip
- var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
- (hostName.substring(hostName.length - 13, hostName.length) === '.kkview.cn');
-
- function loadAppJS()
- {
- mxscript('js/app.min.js', function()
- {
- mxScriptsLoaded = true;
- checkAllLoaded();
-
- // Electron
- if (mxIsElectron)
- {
- mxscript('js/diagramly/DesktopLibrary.js', function()
- {
- mxscript('js/diagramly/ElectronApp.js', function()
- {
- mxscript('js/extensions.min.js', function()
- {
- mxscript('js/stencils.min.js', function()
- {
- mxscript('js/shapes-14-6-5.min.js', function()
- {
- mxscript('js/PostConfig.js');
- });
- });
- });
- });
- });
- }
- else if (!supportedDomain)
- {
- mxscript('js/PostConfig.js');
- }
- });
- };
-
- if (!supportedDomain || mxIsElectron)
- {
- mxscript('js/PreConfig.js', loadAppJS);
- }
- else
- {
- loadAppJS();
- }
- })();
- }
- // Adds basic error handling
- window.onerror = function()
- {
- var status = document.getElementById('geStatus');
-
- if (status != null)
- {
- status.innerHTML = 'Page could not be loaded. Please try refreshing.';
- }
- };
- </script>
- <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
- <link rel="shortcut icon" href="favicon.ico">
- <style type="text/css">
- body { overflow:hidden; }
- div.picker { z-index: 10007; }
- .geSidebarContainer .geTitle input {
- font-size:8pt;
- color:#606060;
- }
- .geBlock {
- z-index:-3;
- margin:100px;
- margin-top:40px;
- margin-bottom:30px;
- padding:20px;
- text-align:center;
- min-width:50%;
- }
- .geBlock h1, .geBlock h2 {
- margin-top:0px;
- padding-top:0px;
- }
- .geEditor *:not(.geScrollable)::-webkit-scrollbar {
- width:10px;
- height:10px;
- }
- .geEditor ::-webkit-scrollbar-track {
- background-clip:padding-box;
- border:solid transparent;
- border-width:1px;
- }
- .geEditor ::-webkit-scrollbar-corner {
- background-color:transparent;
- }
- .geEditor ::-webkit-scrollbar-thumb {
- background-color:rgba(0,0,0,.1);
- background-clip:padding-box;
- border:solid transparent;
- border-radius:10px;
- }
- .geEditor ::-webkit-scrollbar-thumb:hover {
- background-color:rgba(0,0,0,.4);
- }
- .geTemplate {
- border:1px solid transparent;
- display:inline-block;
- _display:inline;
- vertical-align:top;
- border-radius:3px;
- overflow:hidden;
- font-size:14pt;
- cursor:pointer;
- margin:5px;
- }
- </style>
- <!-- Workaround for binary XHR in IE 9/10, see App.loadUrl -->
- <!--[if (IE 9)|(IE 10)]><!-->
- <script type="text/vbscript">
- Function mxUtilsBinaryToArray(Binary)
- Dim i
- ReDim byteArray(LenB(Binary))
- For i = 1 To LenB(Binary)
- byteArray(i-1) = AscB(MidB(Binary, i, 1))
- Next
- mxUtilsBinaryToArray = byteArray
- End Function
- </script>
- <!--<![endif]-->
- </head>
- <body class="geEditor">
- <script type="text/javascript">
- /**
- * Main
- */
- if (urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function")
- {
- window.addEventListener('load', function()
- {
- mxWinLoaded = true;
- checkAllLoaded();
- });
- }
- else
- {
- App.main();
- }
- </script>
- </body>
- </html>
|