Skip to content

Commit 9a27b44

Browse files
authored
Merge pull request #6342 from AnalyticalGraphicsInc/sandcastleFromUrl
Share Sandcastle code using URL instead of gists.
2 parents d74d321 + ea11d8a commit 9a27b44

File tree

8 files changed

+172
-151
lines changed

8 files changed

+172
-151
lines changed

Apps/Sandcastle/CesiumSandcastle.js

+117-142
Large diffs are not rendered by default.

Apps/Sandcastle/ThirdParty/clipboard.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(The MIT License)
2+
3+
Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Apps/Sandcastle/ThirdParty/pako.min.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/Sandcastle/gallery/3D Models.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === "function") {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -86,7 +88,7 @@
8688

8789
Sandcastle.addToolbarMenu(options);
8890
//Sandcastle_End
89-
Sandcastle.finishedLoading();
91+
Sandcastle.finishedLoading();
9092
}
9193
if (typeof Cesium !== "undefined") {
9294
startup(Cesium);

Apps/Sandcastle/index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@
8282
<div id="buttonShareDrop" data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass: 'shareIcon', showLabel: true">
8383
<span>Share</span>
8484
<div id="dropDownShare" data-dojo-type="dijit.TooltipDialog" data-dojo-props="class: 'popDownDialog'">
85-
Be sure to re-share if you make any changes.<br />
86-
<textarea data-dojo-type="dijit.form.Textarea" id="link"
87-
data-dojo-props="trim:true" style="width: 335px;"></textarea>
88-
</div>
85+
Be sure to re-share if you make any changes.
86+
<br />
87+
<input id="shareUrl" type="text" size="35" value="">
88+
<button class="copyButton" data-clipboard-target="#shareUrl">Copy</button>
8989
</div>
90+
</div>
9091
<span data-dojo-type="dijit.ToolbarSeparator"></span>
9192
<div id="buttonImportDrop" data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass: 'gitHubIcon', showLabel: true">
9293
<span>Import Gist</span>

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Change Log
1515
* Added a `ClippingPlane` object to be used with `ClippingPlaneCollection`.
1616
* Added 3D Tiles use-case to Terrain Clipping Planes Sandcastle
1717
* Updated `WebMapServiceImageryProvider` so it can take an srs or crs string to pass to the resource query parameters based on the WMS version. [#6223](https://github.com/AnalyticalGraphicsInc/cesium/issues/6223)
18+
* Sharing Sandcastle examples now works by storing the full example directly in the URL instead of creating GitHub gists, because anonymous gist creation was removed by GitHub. Loading existing gists will still work. [#6342](https://github.com/AnalyticalGraphicsInc/cesium/pull/6342)
1819
* Added additional query parameter options to the CesiumViewer demo application:
1920
* sourceType specifies the type of data source if the URL doesn't have a known file extension.
2021
* flyTo=false optionally disables the automatic flyTo after loading the data source.

LICENSE.md

+13
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,19 @@ http://codemirror.net/
751751
>
752752
> Please note that some subdirectories of the CodeMirror distribution include their own LICENSE files, and are released under different licences.
753753
754+
### clipboard.js
755+
756+
https://clipboardjs.com/
757+
758+
> The MIT License (MIT)
759+
> Copyright © 2018 Zeno Rocha <hi@zenorocha.com>
760+
>
761+
> 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:
762+
>
763+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
764+
>
765+
> 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.
766+
754767
### JSHint
755768

756769
http://www.jshint.com/

0 commit comments

Comments
 (0)