Skip to content

Commit

Permalink
Improve JSDoc output.
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
shunter committed May 29, 2014
1 parent fbcd544 commit af99825
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 716 deletions.
2 changes: 1 addition & 1 deletion Source/Widgets/Animation/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ define([
*
* @example
* // In HTML head, include a link to Animation.css stylesheet,
* // and in the body, include: <div id="animationContainer"></div>
* // and in the body, include: <div id="animationContainer"></div>
*
* var clock = new Cesium.Clock();
* var clockViewModel = new Cesium.ClockViewModel(clock);
Expand Down
4 changes: 2 additions & 2 deletions Source/Widgets/BaseLayerPicker/BaseLayerPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ define([
*
* @example
* // In HTML head, include a link to the BaseLayerPicker.css stylesheet,
* // and in the body, include: &lt;div id="baseLayerPickerContainer"
* // style="position:absolute;top:24px;right:24px;width:38px;height:38px;"&gt;&lt;/div&gt;
* // and in the body, include: <div id="baseLayerPickerContainer"
* // style="position:absolute;top:24px;right:24px;width:38px;height:38px;"></div>
*
* //Create the list of available providers we would like the user to select from.
* //This example uses 3, OpenStreetMap, The Black Marble, and a single, non-streaming world image.
Expand Down
2 changes: 1 addition & 1 deletion Source/Widgets/CesiumWidget/CesiumWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ define([
*
* @example
* // For each example, include a link to CesiumWidget.css stylesheet in HTML head,
* // and in the body, include: &lt;div id="cesiumContainer"&gt;&lt;/div&gt;
* // and in the body, include: <div id="cesiumContainer"></div>
*
* //Widget with no terrain and default Bing Maps imagery provider.
* var widget = new Cesium.CesiumWidget('cesiumContainer');
Expand Down
18 changes: 9 additions & 9 deletions Source/Widgets/NavigationHelpButton/NavigationHelpButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ define([
*
* @example
* // In HTML head, include a link to the NavigationHelpButton.css stylesheet,
* // and in the body, include: &lt;div id="navigationHelpButtonContainer"&gt;&lt;/div&gt;
* // and in the body, include: <div id="navigationHelpButtonContainer"></div>
*
* var navigationHelpButton = new Cesium.NavigationHelpButton({
* container : 'navigationHelpButtonContainer'
* });
*/
var NavigationHelpButton = function (options) {
var NavigationHelpButton = function(options) {
//>>includeStart('debug', pragmas.debug);
if (!defined(options) || !defined(options.container)) {
throw new DeveloperError('options.container is required.');
Expand Down Expand Up @@ -107,7 +107,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
this._viewModel = viewModel;
this._wrapper = wrapper;

this._closeInstructions = function (e) {
this._closeInstructions = function(e) {
if (!wrapper.contains(e.target)) {
viewModel.showInstructions = false;
}
Expand All @@ -124,8 +124,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
*
* @type {Element}
*/
container: {
get: function () {
container : {
get : function() {
return this._container;
}
},
Expand All @@ -136,8 +136,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
*
* @type {NavigationHelpButtonViewModel}
*/
viewModel: {
get: function () {
viewModel : {
get : function() {
return this._viewModel;
}
}
Expand All @@ -147,7 +147,7 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }');
* @memberof NavigationHelpButton
* @returns {Boolean} true if the object has been destroyed, false otherwise.
*/
NavigationHelpButton.prototype.isDestroyed = function () {
NavigationHelpButton.prototype.isDestroyed = function() {
return false;
};

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

Expand Down
5 changes: 2 additions & 3 deletions Source/Widgets/SceneModePicker/SceneModePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ define([
*
* @example
* // In HTML head, include a link to the SceneModePicker.css stylesheet,
* // and in the body, include: &lt;div id="sceneModePickerContainer"&gt;&lt;/div&gt;
* // Note: This code assumed you already have a Scene instance.
* // and in the body, include: <div id="sceneModePickerContainer"></div>
* // Note: This code assumes you already have a Scene instance.
*
* var scene = viewer.scene;
* var sceneModePicker = new Cesium.SceneModePicker('sceneModePickerContainer', scene);
*/
var SceneModePicker = function(container, scene, duration) {
Expand Down
2 changes: 0 additions & 2 deletions Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
(function() {

SyntaxHighlighter.all();

var filterType = document.getElementById('filterType');
var classFilter = document.getElementById('ClassFilter');
var classList = document.getElementById('ClassList');
Expand Down
6 changes: 6 additions & 0 deletions Tools/jsdoc/cesium_template/static/javascript/prism.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

154 changes: 0 additions & 154 deletions Tools/jsdoc/cesium_template/static/javascript/shBrushJScript.js

This file was deleted.

17 changes: 0 additions & 17 deletions Tools/jsdoc/cesium_template/static/javascript/shCore.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ h4
color: #A35A00;
}

h5, .container-overview .subsection-title
h5, .container-overview .subsection-title, .details-header
{
font-size: 120%;
font-weight: bold;
Expand Down
Loading

0 comments on commit af99825

Please sign in to comment.