Skip to content

Commit af99825

Browse files
committed
Improve JSDoc output.
* Switch from the obsolete SyntaxHighlighter to Prism, to allow inline syntax highlighting * Use syntax-highlighting for default values * Fix generated HTML for `@deprecated`. * Fix incorrect HTML escaping in code examples.
1 parent fbcd544 commit af99825

File tree

19 files changed

+160
-716
lines changed

19 files changed

+160
-716
lines changed

Source/Widgets/Animation/Animation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ define([
315315
*
316316
* @example
317317
* // In HTML head, include a link to Animation.css stylesheet,
318-
* // and in the body, include: <div id="animationContainer"></div>
318+
* // and in the body, include: <div id="animationContainer"></div>
319319
*
320320
* var clock = new Cesium.Clock();
321321
* var clockViewModel = new Cesium.ClockViewModel(clock);

Source/Widgets/BaseLayerPicker/BaseLayerPicker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ define([
4848
*
4949
* @example
5050
* // In HTML head, include a link to the BaseLayerPicker.css stylesheet,
51-
* // and in the body, include: &lt;div id="baseLayerPickerContainer"
52-
* // style="position:absolute;top:24px;right:24px;width:38px;height:38px;"&gt;&lt;/div&gt;
51+
* // and in the body, include: <div id="baseLayerPickerContainer"
52+
* // style="position:absolute;top:24px;right:24px;width:38px;height:38px;"></div>
5353
*
5454
* //Create the list of available providers we would like the user to select from.
5555
* //This example uses 3, OpenStreetMap, The Black Marble, and a single, non-streaming world image.

Source/Widgets/CesiumWidget/CesiumWidget.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ define([
113113
*
114114
* @example
115115
* // For each example, include a link to CesiumWidget.css stylesheet in HTML head,
116-
* // and in the body, include: &lt;div id="cesiumContainer"&gt;&lt;/div&gt;
116+
* // and in the body, include: <div id="cesiumContainer"></div>
117117
*
118118
* //Widget with no terrain and default Bing Maps imagery provider.
119119
* var widget = new Cesium.CesiumWidget('cesiumContainer');

Source/Widgets/NavigationHelpButton/NavigationHelpButton.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ define([
3333
*
3434
* @example
3535
* // In HTML head, include a link to the NavigationHelpButton.css stylesheet,
36-
* // and in the body, include: &lt;div id="navigationHelpButtonContainer"&gt;&lt;/div&gt;
36+
* // and in the body, include: <div id="navigationHelpButtonContainer"></div>
3737
*
3838
* var navigationHelpButton = new Cesium.NavigationHelpButton({
3939
* container : 'navigationHelpButtonContainer'
4040
* });
4141
*/
42-
var NavigationHelpButton = function (options) {
42+
var NavigationHelpButton = function(options) {
4343
//>>includeStart('debug', pragmas.debug);
4444
if (!defined(options) || !defined(options.container)) {
4545
throw new DeveloperError('options.container is required.');
@@ -107,7 +107,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
107107
this._viewModel = viewModel;
108108
this._wrapper = wrapper;
109109

110-
this._closeInstructions = function (e) {
110+
this._closeInstructions = function(e) {
111111
if (!wrapper.contains(e.target)) {
112112
viewModel.showInstructions = false;
113113
}
@@ -124,8 +124,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
124124
*
125125
* @type {Element}
126126
*/
127-
container: {
128-
get: function () {
127+
container : {
128+
get : function() {
129129
return this._container;
130130
}
131131
},
@@ -136,8 +136,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
136136
*
137137
* @type {NavigationHelpButtonViewModel}
138138
*/
139-
viewModel: {
140-
get: function () {
139+
viewModel : {
140+
get : function() {
141141
return this._viewModel;
142142
}
143143
}
@@ -147,7 +147,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
147147
* @memberof NavigationHelpButton
148148
* @returns {Boolean} true if the object has been destroyed, false otherwise.
149149
*/
150-
NavigationHelpButton.prototype.isDestroyed = function () {
150+
NavigationHelpButton.prototype.isDestroyed = function() {
151151
return false;
152152
};
153153

@@ -156,7 +156,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
156156
* removing the widget from layout.
157157
* @memberof NavigationHelpButton
158158
*/
159-
NavigationHelpButton.prototype.destroy = function () {
159+
NavigationHelpButton.prototype.destroy = function() {
160160
document.removeEventListener('mousedown', this._closeInstructions, true);
161161
document.removeEventListener('touchstart', this._closeInstructions, true);
162162

Source/Widgets/SceneModePicker/SceneModePicker.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ define([
4545
*
4646
* @example
4747
* // In HTML head, include a link to the SceneModePicker.css stylesheet,
48-
* // and in the body, include: &lt;div id="sceneModePickerContainer"&gt;&lt;/div&gt;
49-
* // Note: This code assumed you already have a Scene instance.
48+
* // and in the body, include: <div id="sceneModePickerContainer"></div>
49+
* // Note: This code assumes you already have a Scene instance.
5050
*
51-
* var scene = viewer.scene;
5251
* var sceneModePicker = new Cesium.SceneModePicker('sceneModePickerContainer', scene);
5352
*/
5453
var SceneModePicker = function(container, scene, duration) {

Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
(function() {
22

3-
SyntaxHighlighter.all();
4-
53
var filterType = document.getElementById('filterType');
64
var classFilter = document.getElementById('ClassFilter');
75
var classList = document.getElementById('ClassList');

Tools/jsdoc/cesium_template/static/javascript/prism.js

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

Tools/jsdoc/cesium_template/static/javascript/shBrushJScript.js

-154
This file was deleted.

Tools/jsdoc/cesium_template/static/javascript/shCore.js

-17
This file was deleted.

Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ h4
393393
color: #A35A00;
394394
}
395395

396-
h5, .container-overview .subsection-title
396+
h5, .container-overview .subsection-title, .details-header
397397
{
398398
font-size: 120%;
399399
font-weight: bold;

0 commit comments

Comments
 (0)