├── .gitignore
├── Source
├── static
│ ├── thirdParty
│ │ ├── require-css
│ │ │ ├── test
│ │ │ │ ├── maxStylesTest
│ │ │ │ │ ├── styles
│ │ │ │ │ │ ├── 1.css
│ │ │ │ │ │ ├── 2.css
│ │ │ │ │ │ ├── 3.css
│ │ │ │ │ │ ├── 4.css
│ │ │ │ │ │ ├── 5.css
│ │ │ │ │ │ ├── 6.css
│ │ │ │ │ │ ├── 7.css
│ │ │ │ │ │ ├── 8.css
│ │ │ │ │ │ ├── 9.css
│ │ │ │ │ │ ├── 10.css
│ │ │ │ │ │ ├── 11.css
│ │ │ │ │ │ ├── 12.css
│ │ │ │ │ │ ├── 13.css
│ │ │ │ │ │ ├── 14.css
│ │ │ │ │ │ ├── 15.css
│ │ │ │ │ │ ├── 16.css
│ │ │ │ │ │ ├── 17.css
│ │ │ │ │ │ ├── 18.css
│ │ │ │ │ │ ├── 19.css
│ │ │ │ │ │ ├── 20.css
│ │ │ │ │ │ ├── 21.css
│ │ │ │ │ │ ├── 22.css
│ │ │ │ │ │ ├── 23.css
│ │ │ │ │ │ ├── 24.css
│ │ │ │ │ │ ├── 25.css
│ │ │ │ │ │ ├── 26.css
│ │ │ │ │ │ ├── 27.css
│ │ │ │ │ │ ├── 28.css
│ │ │ │ │ │ ├── 29.css
│ │ │ │ │ │ ├── 30.css
│ │ │ │ │ │ ├── 31.css
│ │ │ │ │ │ ├── 32.css
│ │ │ │ │ │ ├── 33.css
│ │ │ │ │ │ ├── 34.css
│ │ │ │ │ │ └── 35.css
│ │ │ │ │ ├── test.html
│ │ │ │ │ └── lib
│ │ │ │ │ │ └── require.js
│ │ │ │ └── test.js
│ │ │ ├── example
│ │ │ │ ├── www
│ │ │ │ │ ├── test.css
│ │ │ │ │ ├── components
│ │ │ │ │ │ ├── test.css
│ │ │ │ │ │ ├── component.js
│ │ │ │ │ │ └── component.css
│ │ │ │ │ ├── popup.js
│ │ │ │ │ ├── style
│ │ │ │ │ │ └── style.css
│ │ │ │ │ ├── popup.css
│ │ │ │ │ ├── app.js
│ │ │ │ │ ├── test.html
│ │ │ │ │ └── text.js
│ │ │ │ ├── setup.sh
│ │ │ │ ├── test.html
│ │ │ │ └── build.js
│ │ │ ├── .npmignore
│ │ │ ├── .jsbeautifyrc
│ │ │ ├── .editorconfig
│ │ │ ├── bower.json
│ │ │ ├── LICENSE
│ │ │ ├── package.json
│ │ │ ├── compatibility-test.sh
│ │ │ ├── css.min.js
│ │ │ ├── normalize.js
│ │ │ ├── css.js
│ │ │ ├── README.md
│ │ │ └── css-builder.js
│ │ └── requirejs-2.1.20
│ │ │ ├── MIT.LICENSE
│ │ │ ├── domReady.js
│ │ │ └── require.min.js
│ ├── images
│ │ └── favicon.ico
│ ├── app.js
│ └── startup.js
├── styles
│ ├── cesium.css
│ └── xbsj-custom-iview.less
├── main.js
├── components
│ └── XbsjApp.vue
├── index.html
└── scripts
│ └── initViewer.js
├── .vscode
└── settings.json
├── .babelrc
├── images
├── 2019-01-12-23-27-41.png
├── 2019-01-12-23-32-06.png
├── 2019-01-12-23-33-02.png
├── 2019-01-12-23-34-42.png
└── 2019-01-12-23-49-20.png
├── package.json
├── README.md
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/1.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/2.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/3.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/4.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/5.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/6.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/7.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/8.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/9.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "git.ignoreLimitWarning": true
3 | }
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/10.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/11.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/12.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/13.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/14.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/15.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/16.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/17.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/18.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/19.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/20.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/21.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/22.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/23.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/24.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/25.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/26.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/27.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/28.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/29.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/30.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/31.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/32.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/33.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/34.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/styles/35.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/test.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #fee;
3 | }
4 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/components/test.css:
--------------------------------------------------------------------------------
1 | body {
2 | border: 1px solid #555;
3 | }
4 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-3"],
3 | "plugins": [
4 | "transform-runtime"
5 | ]
6 | }
--------------------------------------------------------------------------------
/Source/static/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/Source/static/images/favicon.ico
--------------------------------------------------------------------------------
/images/2019-01-12-23-27-41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/images/2019-01-12-23-27-41.png
--------------------------------------------------------------------------------
/images/2019-01-12-23-32-06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/images/2019-01-12-23-32-06.png
--------------------------------------------------------------------------------
/images/2019-01-12-23-33-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/images/2019-01-12-23-33-02.png
--------------------------------------------------------------------------------
/images/2019-01-12-23-34-42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/images/2019-01-12-23-34-42.png
--------------------------------------------------------------------------------
/images/2019-01-12-23-49-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cesiumlab/cesium-vue-webpack/HEAD/images/2019-01-12-23-49-20.png
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/.npmignore:
--------------------------------------------------------------------------------
1 | example/www-built
2 | node_modules
3 | bower_components
4 | *.log
5 | *.DS_Store
6 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/.jsbeautifyrc:
--------------------------------------------------------------------------------
1 | {
2 | "js": {
3 | "indent_char": " ",
4 | "indent_size": 2
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Source/styles/cesium.css:
--------------------------------------------------------------------------------
1 |
2 | .compass {
3 | pointer-events: auto;
4 | /* right: 0; */
5 | overflow: hidden;
6 | top: 10px;
7 | }
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/components/component.js:
--------------------------------------------------------------------------------
1 | define(['css!./component'], function() {
2 | return {component: 'is here'};
3 | });
4 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/popup.js:
--------------------------------------------------------------------------------
1 | define(['css!popup'], function() {
2 | return "
";
3 | });
4 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | indent_style = space
3 | indent_size = 2
4 | #trim_trailing_whitespace = true
5 | insert_final_newline = true
6 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/components/component.css:
--------------------------------------------------------------------------------
1 | /* component.css */
2 | @import 'test.css';
3 | body {
4 | background-image: url(../test.jpg);
5 | }
6 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/style/style.css:
--------------------------------------------------------------------------------
1 | /* module.css */
2 | /* used by app.js */
3 | @import '/test.css'
4 | body {
5 | font-family: sans-serif;
6 | }
7 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "require-css",
3 | "version": "0.1.10",
4 | "ignore": ["example", "test", ".gitignore"],
5 | "main": ["css.js"]
6 | }
7 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # build the symlink to require-css. done by script as it breaks project builds
4 | cd www
5 | ln -s ../../ require-css
6 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/popup.css:
--------------------------------------------------------------------------------
1 | .popup {
2 | width: 300px;
3 | height: 300px;
4 | padding: 20px;
5 | background-color: green;
6 | font-family: times;
7 | }
8 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/app.js:
--------------------------------------------------------------------------------
1 | /* nb css form below implies inline style in js file for automatic injection */
2 | define(['css!style/style', 'components/component'], function(component) {
3 | return 'uses the component!';
4 | });
5 |
--------------------------------------------------------------------------------
/Source/main.js:
--------------------------------------------------------------------------------
1 | // 第三方库
2 | import Vue from 'vue';
3 | import iView from 'iview';
4 |
5 | // iview默认样式
6 | // import 'iview/dist/styles/iview.css';
7 |
8 | // 使用iView自定义样式
9 | import './styles/xbsj-custom-iview.less';
10 |
11 | // 自定义样式
12 | import './styles/cesium.css';
13 |
14 | // 导入相关组件
15 | import XbsjApp from './components/XbsjApp.vue';
16 |
17 | Vue.use(iView);
18 |
19 | var app = new Vue({
20 | el: '#app',
21 | components: {
22 | XbsjApp: XbsjApp,
23 | },
24 | });
25 |
26 | // 隐藏loading
27 | var loading = document.getElementById("loading");
28 | loading && (loading.style.display = "none");
--------------------------------------------------------------------------------
/Source/static/app.js:
--------------------------------------------------------------------------------
1 | require.config({
2 | paths: {
3 | main: './main',
4 | viewerCesiumNavigationMixin: './static/thirdParty/navigator/standalone/viewerCesiumNavigationMixin',
5 | },
6 | shim: {
7 | viewerCesiumNavigationMixin: {
8 | deps: ['Cesium']
9 | },
10 | main: {
11 | deps: ['Cesium', 'viewerCesiumNavigationMixin'],
12 | }
13 | }
14 | });
15 |
16 | define([
17 | 'Cesium',
18 | 'viewerCesiumNavigationMixin',
19 | 'main',
20 | // './Sandcastle-header.js',
21 | // 'rcss!./bucket.css',
22 | 'domReady!',
23 | ], function () {
24 | 'use strict';
25 | });
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/www/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 | test
16 |
17 |
18 |
19 |
28 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 | test
17 |
18 |
19 |
20 |
29 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/example/build.js:
--------------------------------------------------------------------------------
1 | ({
2 | appDir: 'www',
3 | dir: 'www-built',
4 | baseUrl: '.',
5 | fileExclusionRegExp: /(^example)|(.git)|(node_modules)|(bower_components)$/,
6 | //separateCSS: true,
7 | //buildCSS: false,
8 | optimizeCss: "standard",
9 | map: {
10 | '*': {
11 | css: 'require-css/css'
12 | }
13 | },
14 | modules: [
15 | {
16 | name: 'app',
17 | exclude: ['app/core-components'],
18 | },
19 | {
20 | name: 'app/core-components',
21 | create: true,
22 | include: ['components/component'],
23 | exclude: ['require-css/normalize']
24 | },
25 | {
26 | name: 'popup',
27 | exclude: ['app/core-components', 'require-css/normalize']
28 | }
29 | ]
30 | //name: 'app.js',
31 | //out: 'app-built.js'
32 | })
33 |
--------------------------------------------------------------------------------
/Source/static/startup.js:
--------------------------------------------------------------------------------
1 | if (typeof require === 'function') {
2 | define('Cesium', ['CesiumDir/Cesium', 'rcss!CesiumDir/Widgets/widgets.css'], function (Cesium) {
3 | window.Cesium = Cesium || window.Cesium;
4 | Cesium = window.Cesium;
5 | return Cesium;
6 | });
7 |
8 | require.config({
9 | baseUrl: '.',
10 | paths: {
11 | domReady: './static/thirdParty/requirejs-2.1.20/domReady',
12 | rcss: './static/thirdParty/require-css/css.min',
13 | CesiumDir: './static/Cesium',
14 | },
15 | waitSeconds : 5000,
16 | });
17 |
18 | setTimeout(function () {
19 | require(['./static/app'], function () {
20 | // do nothing
21 | });
22 | }, 1000);
23 | } else {
24 | alert('万劫不复之地!!!');
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 | -----------
3 |
4 | Copyright (C) 2013 Guy Bedford
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "_from": "require-css",
3 | "_id": "require-css@0.1.10",
4 | "_inBundle": false,
5 | "_integrity": "sha1-8duMbPsq0qOnQJFmzGz5mw0/RQI=",
6 | "_location": "/require-css",
7 | "_phantomChildren": {},
8 | "_requested": {
9 | "type": "tag",
10 | "registry": true,
11 | "raw": "require-css",
12 | "name": "require-css",
13 | "escapedName": "require-css",
14 | "rawSpec": "",
15 | "saveSpec": null,
16 | "fetchSpec": "latest"
17 | },
18 | "_requiredBy": [
19 | "#USER",
20 | "/"
21 | ],
22 | "_resolved": "http://registry.npm.taobao.org/require-css/download/require-css-0.1.10.tgz",
23 | "_shasum": "f1db8c6cfb2ad2a3a7409166cc6cf99b0d3f4502",
24 | "_spec": "require-css",
25 | "_where": "C:\\vtxf\\time\\2018\\projects\\github\\vue-webpack\\vtxfProject1",
26 | "bundleDependencies": false,
27 | "deprecated": false,
28 | "description": "require-css ===========",
29 | "name": "require-css",
30 | "scripts": {
31 | "test": "node test/test.js"
32 | },
33 | "version": "0.1.10",
34 | "volo": {
35 | "type": "directory"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/requirejs-2.1.20/MIT.LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2015, The Dojo Foundation
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/compatibility-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # To cover all possible use case, you should change `optimizeCss` in `example/build.js` from "none" to
4 | # optimizeCss: "standard.keepLines"
5 | # optimizeCss: "standard.keepWhitespace"
6 | # optimizeCss: "standard.keepComments"
7 | # optimizeCss: "standard.keepComments.keepLines"
8 | # optimizeCss: "standard.keepLines.keepWhitespace" - default by r.js
9 |
10 | (
11 | npm install requirejs@2.1.10 -g
12 |
13 | npm install csso@1.3.12 -g
14 | r.js -o example/build.js
15 |
16 | npm install csso@1.4.0 -g
17 | r.js -o example/build.js
18 |
19 | npm install csso@1.8.0 -g
20 | r.js -o example/build.js
21 |
22 | npm install csso@2.0.0 -g
23 | r.js -o example/build.js
24 |
25 | npm install csso@latest -g
26 | r.js -o example/build.js
27 |
28 | # RequireJS@latest
29 |
30 | npm install requirejs@latest -g
31 |
32 | npm install csso@1.3.12 -g
33 | r.js -o example/build.js
34 |
35 | npm install csso@1.4.0 -g
36 | r.js -o example/build.js
37 |
38 | npm install csso@1.8.0 -g
39 | r.js -o example/build.js
40 |
41 | npm install csso@2.0.0 -g
42 | r.js -o example/build.js
43 |
44 | npm install csso@latest -g
45 | r.js -o example/build.js
46 | ) > compatibility.log
47 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/maxStylesTest/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/css.min.js:
--------------------------------------------------------------------------------
1 | define(function(){if("undefined"==typeof window)return{load:function(a,b,c){c()}};var a=document.getElementsByTagName("head")[0],b=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,c=!1,d=!0;b[1]||b[7]?c=parseInt(b[1])<6||parseInt(b[7])<=9:b[2]||b[8]?d=!1:b[4]&&(c=parseInt(b[4])<18);var e={};e.pluginBuilder="./css-builder";var f,g,h,i=function(){f=document.createElement("style"),a.appendChild(f),g=f.styleSheet||f.sheet},j=0,k=[],l=function(a){g.addImport(a),f.onload=function(){m()},j++,31==j&&(i(),j=0)},m=function(){h();var a=k.shift();return a?(h=a[1],void l(a[0])):void(h=null)},n=function(a,b){if(g&&g.addImport||i(),g&&g.addImport)h?k.push([a,b]):(l(a),h=b);else{f.textContent='@import "'+a+'";';var c=setInterval(function(){try{f.sheet.cssRules,clearInterval(c),b()}catch(a){}},10)}},o=function(b,c){var e=document.createElement("link");if(e.type="text/css",e.rel="stylesheet",d)e.onload=function(){e.onload=function(){},setTimeout(c,7)};else var f=setInterval(function(){for(var a=0;a
2 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/test/test.js:
--------------------------------------------------------------------------------
1 | var requirejs = require('requirejs');
2 |
3 | var passed = 0;
4 | var failed = 0;
5 | var assert = function(name, statement, val) {
6 | if (statement === val) {
7 | console.log(' ' + name + '... passed.');
8 | passed++;
9 | }
10 | else {
11 | console.log(' ' + name + '... failed.\n ' + 'Expected "' + val + '" got "' + statement + '"\n');
12 | failed++;
13 | }
14 | }
15 |
16 | requirejs(['../css', '../normalize'], function(css, normalize) {
17 | console.log('\n--- Starting Require CSS Tests ---');
18 |
19 | console.log('\nTesting URL Base Conversions');
20 | assert(
21 | 'Changing subfolder',
22 | normalize.convertURIBase('test', '/one/two/', '/one/three/'),
23 | '../two/test'
24 | );
25 | assert(
26 | 'Changing subfolder with backtrack',
27 | normalize.convertURIBase('../test', '/one/two/', '/one/three/'),
28 | '../test'
29 | );
30 | assert(
31 | 'Changing two subfolders with a folder',
32 | normalize.convertURIBase('some/test', '/one/two/three/', '/one/four/five/'),
33 | '../../two/three/some/test'
34 | );
35 | assert(
36 | 'Double forward slashes in relative URI',
37 | normalize.convertURIBase('some//test', '/one/two/three/', '/one/two/four/'),
38 | '../three/some/test'
39 | );
40 | assert(
41 | 'protocol base urls work',
42 | normalize.convertURIBase('some/file', 'http://www.google.com:80/', 'http://www.google.com:80/sub/'),
43 | '../some/file'
44 | );
45 | assert(
46 | 'absolute protocol paths work with base conversion',
47 | normalize.convertURIBase('some/file', 'http://some.cdn.com/baseUrl/', 'baseUrl/'),
48 | 'http://some.cdn.com/baseUrl/some/file'
49 | );
50 | console.log('\nTesting Stylesheet Regular Expressions');
51 | assert(
52 | '@import statements',
53 | normalize('@import "test.css"', '/first/', '/second/'),
54 | '@import "../first/test.css"'
55 | );
56 | assert(
57 | 'url includes',
58 | normalize('background: url("../some/test.css")', '/first/one/', '/second/one/'),
59 | 'background: url("../../first/some/test.css")'
60 | );
61 | assert(
62 | 'absolute url detection',
63 | normalize.absoluteURI("//font.server.com/static/fonts/opensans.woff", '/first/one/', '/second/one/'),
64 | '//font.server.com/static/fonts/opensans.woff'
65 | );
66 | assert(
67 | 'absolute url convert base',
68 | normalize.convertURIBase("//font.server.com/static/fonts/opensans.woff", '/first/one/', '/second/one/'),
69 | '//font.server.com/static/fonts/opensans.woff'
70 | );
71 | assert(
72 | 'absolute url convert base',
73 | normalize.convertURIBase("http://font.server.com/static/fonts/opensans.woff", '/first/one/', '/second/one/'),
74 | 'http://font.server.com/static/fonts/opensans.woff'
75 | );
76 | assert(
77 | 'multiple url includes on the same line',
78 | normalize('src: url("../fonts/font.eot") format("embedded-opentype"), url("../fonts/font.woff") format("woff");', '/base/', '/'),
79 | 'src: url("fonts/font.eot") format("embedded-opentype"), url("fonts/font.woff") format("woff");'
80 | );
81 | assert(
82 | 'absolute URI test',
83 | normalize.absoluteURI('/my/file.less', 'http://localhost:8000/'),
84 | '/my/file.less'
85 | );
86 |
87 | console.log('\n--- Require CSS Tests Complete: ' + passed + ' passed, ' + failed + ' failed. ---\n');
88 | });
89 |
--------------------------------------------------------------------------------
/Source/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
121 |
正在加载 ...
122 |
123 |
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/requirejs-2.1.20/domReady.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
3 | * Available via the MIT or new BSD license.
4 | * see: http://github.com/requirejs/domReady for details
5 | */
6 | /*jslint */
7 | /*global require: false, define: false, requirejs: false,
8 | window: false, clearInterval: false, document: false,
9 | self: false, setInterval: false */
10 |
11 |
12 | define(function () {
13 | 'use strict';
14 |
15 | var isTop, testDiv, scrollIntervalId,
16 | isBrowser = typeof window !== "undefined" && window.document,
17 | isPageLoaded = !isBrowser,
18 | doc = isBrowser ? document : null,
19 | readyCalls = [];
20 |
21 | function runCallbacks(callbacks) {
22 | var i;
23 | for (i = 0; i < callbacks.length; i += 1) {
24 | callbacks[i](doc);
25 | }
26 | }
27 |
28 | function callReady() {
29 | var callbacks = readyCalls;
30 |
31 | if (isPageLoaded) {
32 | //Call the DOM ready callbacks
33 | if (callbacks.length) {
34 | readyCalls = [];
35 | runCallbacks(callbacks);
36 | }
37 | }
38 | }
39 |
40 | /**
41 | * Sets the page as loaded.
42 | */
43 | function pageLoaded() {
44 | if (!isPageLoaded) {
45 | isPageLoaded = true;
46 | if (scrollIntervalId) {
47 | clearInterval(scrollIntervalId);
48 | }
49 |
50 | callReady();
51 | }
52 | }
53 |
54 | if (isBrowser) {
55 | if (document.addEventListener) {
56 | //Standards. Hooray! Assumption here that if standards based,
57 | //it knows about DOMContentLoaded.
58 | document.addEventListener("DOMContentLoaded", pageLoaded, false);
59 | window.addEventListener("load", pageLoaded, false);
60 | } else if (window.attachEvent) {
61 | window.attachEvent("onload", pageLoaded);
62 |
63 | testDiv = document.createElement('div');
64 | try {
65 | isTop = window.frameElement === null;
66 | } catch (e) {}
67 |
68 | //DOMContentLoaded approximation that uses a doScroll, as found by
69 | //Diego Perini: http://javascript.nwbox.com/IEContentLoaded/,
70 | //but modified by other contributors, including jdalton
71 | if (testDiv.doScroll && isTop && window.external) {
72 | scrollIntervalId = setInterval(function () {
73 | try {
74 | testDiv.doScroll();
75 | pageLoaded();
76 | } catch (e) {}
77 | }, 30);
78 | }
79 | }
80 |
81 | //Check if document already complete, and if so, just trigger page load
82 | //listeners. Latest webkit browsers also use "interactive", and
83 | //will fire the onDOMContentLoaded before "interactive" but not after
84 | //entering "interactive" or "complete". More details:
85 | //http://dev.w3.org/html5/spec/the-end.html#the-end
86 | //http://stackoverflow.com/questions/3665561/document-readystate-of-interactive-vs-ondomcontentloaded
87 | //Hmm, this is more complicated on further use, see "firing too early"
88 | //bug: https://github.com/requirejs/domReady/issues/1
89 | //so removing the || document.readyState === "interactive" test.
90 | //There is still a window.onload binding that should get fired if
91 | //DOMContentLoaded is missed.
92 | if (document.readyState === "complete") {
93 | pageLoaded();
94 | }
95 | }
96 |
97 | /** START OF PUBLIC API **/
98 |
99 | /**
100 | * Registers a callback for DOM ready. If DOM is already ready, the
101 | * callback is called immediately.
102 | * @param {Function} callback
103 | */
104 | function domReady(callback) {
105 | if (isPageLoaded) {
106 | callback(doc);
107 | } else {
108 | readyCalls.push(callback);
109 | }
110 | return domReady;
111 | }
112 |
113 | domReady.version = '2.0.1';
114 |
115 | /**
116 | * Loader Plugin API method
117 | */
118 | domReady.load = function (name, req, onLoad, config) {
119 | if (config.isBuild) {
120 | onLoad(null);
121 | } else {
122 | domReady(onLoad);
123 | }
124 | };
125 |
126 | /** END OF PUBLIC API **/
127 |
128 | return domReady;
129 | });
130 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/normalize.js:
--------------------------------------------------------------------------------
1 | //>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
2 | /*
3 | * css.normalize.js
4 | *
5 | * CSS Normalization
6 | *
7 | * CSS paths are normalized based on an optional basePath and the RequireJS config
8 | *
9 | * Usage:
10 | * normalize(css, fromBasePath, toBasePath);
11 | *
12 | * css: the stylesheet content to normalize
13 | * fromBasePath: the absolute base path of the css relative to any root (but without ../ backtracking)
14 | * toBasePath: the absolute new base path of the css relative to the same root
15 | *
16 | * Absolute dependencies are left untouched.
17 | *
18 | * Urls in the CSS are picked up by regular expressions.
19 | * These will catch all statements of the form:
20 | *
21 | * url(*)
22 | * url('*')
23 | * url("*")
24 | *
25 | * @import '*'
26 | * @import "*"
27 | *
28 | * (and so also @import url(*) variations)
29 | *
30 | * For urls needing normalization
31 | *
32 | */
33 |
34 | define(function() {
35 |
36 | // regular expression for removing double slashes
37 | // eg http://www.example.com//my///url/here -> http://www.example.com/my/url/here
38 | var slashes = /([^:])\/+/g
39 | var removeDoubleSlashes = function(uri) {
40 | return uri.replace(slashes, '$1/');
41 | }
42 |
43 | // given a relative URI, and two absolute base URIs, convert it from one base to another
44 | var protocolRegEx = /[^\:\/]*:\/\/([^\/])*/;
45 | var absUrlRegEx = /^(\/|data:)/;
46 | function convertURIBase(uri, fromBase, toBase) {
47 | if (uri.match(absUrlRegEx) || uri.match(protocolRegEx))
48 | return uri;
49 | uri = removeDoubleSlashes(uri);
50 | // if toBase specifies a protocol path, ensure this is the same protocol as fromBase, if not
51 | // use absolute path at fromBase
52 | var toBaseProtocol = toBase.match(protocolRegEx);
53 | var fromBaseProtocol = fromBase.match(protocolRegEx);
54 | if (fromBaseProtocol && (!toBaseProtocol || toBaseProtocol[1] != fromBaseProtocol[1] || toBaseProtocol[2] != fromBaseProtocol[2]))
55 | return absoluteURI(uri, fromBase);
56 |
57 | else {
58 | return relativeURI(absoluteURI(uri, fromBase), toBase);
59 | }
60 | };
61 |
62 | // given a relative URI, calculate the absolute URI
63 | function absoluteURI(uri, base) {
64 | if (uri.substr(0, 2) == './')
65 | uri = uri.substr(2);
66 |
67 | // absolute urls are left in tact
68 | if (uri.match(absUrlRegEx) || uri.match(protocolRegEx))
69 | return uri;
70 |
71 | var baseParts = base.split('/');
72 | var uriParts = uri.split('/');
73 |
74 | baseParts.pop();
75 |
76 | while (curPart = uriParts.shift())
77 | if (curPart == '..')
78 | baseParts.pop();
79 | else
80 | baseParts.push(curPart);
81 |
82 | return baseParts.join('/');
83 | };
84 |
85 |
86 | // given an absolute URI, calculate the relative URI
87 | function relativeURI(uri, base) {
88 |
89 | // reduce base and uri strings to just their difference string
90 | var baseParts = base.split('/');
91 | baseParts.pop();
92 | base = baseParts.join('/') + '/';
93 | i = 0;
94 | while (base.substr(i, 1) == uri.substr(i, 1))
95 | i++;
96 | while (base.substr(i, 1) != '/')
97 | i--;
98 | base = base.substr(i + 1);
99 | uri = uri.substr(i + 1);
100 |
101 | // each base folder difference is thus a backtrack
102 | baseParts = base.split('/');
103 | var uriParts = uri.split('/');
104 | out = '';
105 | while (baseParts.shift())
106 | out += '../';
107 |
108 | // finally add uri parts
109 | while (curPart = uriParts.shift())
110 | out += curPart + '/';
111 |
112 | return out.substr(0, out.length - 1);
113 | };
114 |
115 | var normalizeCSS = function(source, fromBase, toBase) {
116 |
117 | fromBase = removeDoubleSlashes(fromBase);
118 | toBase = removeDoubleSlashes(toBase);
119 |
120 | var urlRegEx = /@import\s*("([^"]*)"|'([^']*)')|url\s*\((?!#)\s*(\s*"([^"]*)"|'([^']*)'|[^\)]*\s*)\s*\)/ig;
121 | var result, url, source;
122 |
123 | while (result = urlRegEx.exec(source)) {
124 | url = result[3] || result[2] || result[5] || result[6] || result[4];
125 | var newUrl;
126 | newUrl = convertURIBase(url, fromBase, toBase);
127 | var quoteLen = result[5] || result[6] ? 1 : 0;
128 | source = source.substr(0, urlRegEx.lastIndex - url.length - quoteLen - 1) + newUrl + source.substr(urlRegEx.lastIndex - quoteLen - 1);
129 | urlRegEx.lastIndex = urlRegEx.lastIndex + (newUrl.length - url.length);
130 | }
131 |
132 | return source;
133 | };
134 |
135 | normalizeCSS.convertURIBase = convertURIBase;
136 | normalizeCSS.absoluteURI = absoluteURI;
137 | normalizeCSS.relativeURI = relativeURI;
138 |
139 | return normalizeCSS;
140 | });
141 | //>>excludeEnd('excludeRequireCss')
142 |
--------------------------------------------------------------------------------
/Source/scripts/initViewer.js:
--------------------------------------------------------------------------------
1 | import Cesium from 'Cesium';
2 |
3 | function initViewer(container) {
4 | // 默认指向中国
5 | Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(118.0, 27.0, 123.0, 31.0);
6 | Cesium.Camera.DEFAULT_VIEW_FACTOR = 3.0;
7 |
8 | // 移动设备检测
9 | window.mobilecheck = function () {
10 | var check = false;
11 | (function (a) {
12 | if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
13 | })(navigator.userAgent || navigator.vendor || window.opera);
14 | return check;
15 | };
16 |
17 | // 创建Viewer
18 | var viewer = new Cesium.Viewer(container, {
19 | imageryProvider: Cesium.createTileMapServiceImageryProvider({
20 | url: Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII'),
21 | fileExtension: 'jpg',
22 | }),
23 | baseLayerPicker: false,
24 | geocoder: false,
25 | animation: false,
26 | baseLayerPicker: false,
27 | fullscreenButton: false,
28 | vrButton: false,
29 | geocoder: false,
30 | homeButton: false,
31 | // infoBox: false,
32 | sceneModePicker: false,
33 | selectionIndicator: false,
34 | timeline: false,
35 | navigationHelpButton: false,
36 | navigationInstructionsInitiallyVisible: false,
37 | shouldAnimate: true,
38 | contextOptions: {
39 | webgl: {
40 | antialias: !mobilecheck()
41 | }
42 | },
43 | terrainProvider: new Cesium.EllipsoidTerrainProvider(),
44 | scene3DOnly: false,
45 | });
46 |
47 | // 分辨率调整
48 | viewer._cesiumWidget._supportsImageRenderingPixelated = Cesium.FeatureDetection.supportsImageRenderingPixelated();
49 | viewer._cesiumWidget._forceResize = true;
50 | if (Cesium.FeatureDetection.supportsImageRenderingPixelated()) {
51 | var dpr = window.devicePixelRatio;
52 | // 适度降低分辨率
53 | while (dpr >= 2.0) {
54 | dpr /= 2.0;
55 | }
56 | //alert(dpr);
57 | viewer.resolutionScale = dpr;
58 | }
59 |
60 | // navigation插件设置
61 | if (Cesium.viewerCesiumNavigationMixin) {
62 | let navigationOptions = {};
63 | // navigationOptions.defaultResetView = Cesium.Rectangle.fromDegrees(71, 3, 90, 14);
64 | // Only the compass will show on the map
65 | navigationOptions.enableCompass = true;
66 | navigationOptions.enableZoomControls= false;
67 | navigationOptions.enableDistanceLegend= true;
68 | navigationOptions.enableCompassOuterRing= true;
69 | viewer.extend(Cesium.viewerCesiumNavigationMixin, navigationOptions);
70 | }
71 |
72 | // 加载谷歌中国卫星影像
73 | // var googleImageryUrl = "//mt1.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali"; // 不带标注
74 | var googleImageryUrl = '//www.google.cn/maps/vt?lyrs=s,h&gl=CN&x={x}&y={y}&z={z}';
75 | var googleImageryProvider = new Cesium.UrlTemplateImageryProvider({url:googleImageryUrl})
76 | var googleImageryLayer = viewer.imageryLayers.addImageryProvider(googleImageryProvider);
77 |
78 | // 去掉默认的logo
79 | //viewer._cesiumWidget._creditContainer.style.display = 'none';
80 |
81 | return viewer;
82 | }
83 |
84 | export default initViewer;
85 |
--------------------------------------------------------------------------------
/Source/static/thirdParty/require-css/css.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Require-CSS RequireJS css! loader plugin
3 | * 0.1.10
4 | * Guy Bedford 2014
5 | * MIT
6 | */
7 |
8 | /*
9 | *
10 | * Usage:
11 | * require(['css!./mycssFile']);
12 | *
13 | * Tested and working in (up to latest versions as of March 2013):
14 | * Android
15 | * iOS 6
16 | * IE 6 - 10
17 | * Chrome 3 - 26
18 | * Firefox 3.5 - 19
19 | * Opera 10 - 12
20 | *
21 | * browserling.com used for virtual testing environment
22 | *
23 | * Credit to B Cavalier & J Hann for the IE 6 - 9 method,
24 | * refined with help from Martin Cermak
25 | *
26 | * Sources that helped along the way:
27 | * - https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
28 | * - http://www.phpied.com/when-is-a-stylesheet-really-loaded/
29 | * - https://github.com/cujojs/curl/blob/master/src/curl/plugin/css.js
30 | *
31 | */
32 |
33 | define(function() {
34 | //>>excludeStart('excludeRequireCss', pragmas.excludeRequireCss)
35 | if (typeof window == 'undefined')
36 | return { load: function(n, r, load){ load() } };
37 |
38 | var head = document.getElementsByTagName('head')[0];
39 |
40 | var engine = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/) || 0;
41 |
42 | // use