diff --git a/Source/Widgets/Animation/Animation.js b/Source/Widgets/Animation/Animation.js index a0443943b04e..b7005841e8a4 100644 --- a/Source/Widgets/Animation/Animation.js +++ b/Source/Widgets/Animation/Animation.js @@ -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:
* * var clock = new Cesium.Clock(); * var clockViewModel = new Cesium.ClockViewModel(clock); diff --git a/Source/Widgets/BaseLayerPicker/BaseLayerPicker.js b/Source/Widgets/BaseLayerPicker/BaseLayerPicker.js index 9bc8ccfc8b4a..ef08cdd7dc9b 100644 --- a/Source/Widgets/BaseLayerPicker/BaseLayerPicker.js +++ b/Source/Widgets/BaseLayerPicker/BaseLayerPicker.js @@ -48,8 +48,8 @@ define([ * * @example * // In HTML head, include a link to the BaseLayerPicker.css stylesheet, - * // and in the body, include: <div id="baseLayerPickerContainer" - * // style="position:absolute;top:24px;right:24px;width:38px;height:38px;"></div> + * // and in the body, include: * * //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. diff --git a/Source/Widgets/CesiumWidget/CesiumWidget.js b/Source/Widgets/CesiumWidget/CesiumWidget.js index beacfbe9a4fb..c9c7320c7e1f 100644 --- a/Source/Widgets/CesiumWidget/CesiumWidget.js +++ b/Source/Widgets/CesiumWidget/CesiumWidget.js @@ -113,7 +113,7 @@ define([ * * @example * // For each example, include a link to CesiumWidget.css stylesheet in HTML head, - * // and in the body, include: <div id="cesiumContainer"></div> + * // and in the body, include: * * //Widget with no terrain and default Bing Maps imagery provider. * var widget = new Cesium.CesiumWidget('cesiumContainer'); diff --git a/Source/Widgets/NavigationHelpButton/NavigationHelpButton.js b/Source/Widgets/NavigationHelpButton/NavigationHelpButton.js index b348e8103ac3..c031deb955d1 100644 --- a/Source/Widgets/NavigationHelpButton/NavigationHelpButton.js +++ b/Source/Widgets/NavigationHelpButton/NavigationHelpButton.js @@ -33,13 +33,13 @@ define([ * * @example * // In HTML head, include a link to the NavigationHelpButton.css stylesheet, - * // and in the body, include: <div id="navigationHelpButtonContainer"></div> + * // and in the body, include: * * 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.'); @@ -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; } @@ -124,8 +124,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }'); * * @type {Element} */ - container: { - get: function () { + container : { + get : function() { return this._container; } }, @@ -136,8 +136,8 @@ cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }'); * * @type {NavigationHelpButtonViewModel} */ - viewModel: { - get: function () { + viewModel : { + get : function() { return this._viewModel; } } @@ -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; }; @@ -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); diff --git a/Source/Widgets/SceneModePicker/SceneModePicker.js b/Source/Widgets/SceneModePicker/SceneModePicker.js index 862bb22cd1b9..63b280461abc 100644 --- a/Source/Widgets/SceneModePicker/SceneModePicker.js +++ b/Source/Widgets/SceneModePicker/SceneModePicker.js @@ -45,10 +45,9 @@ define([ * * @example * // In HTML head, include a link to the SceneModePicker.css stylesheet, - * // and in the body, include: <div id="sceneModePickerContainer"></div> - * // Note: This code assumed you already have a Scene instance. + * // and in the body, include: + * // 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) { diff --git a/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js b/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js index db58288b08bd..8582f4b649c9 100644 --- a/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js +++ b/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js @@ -1,7 +1,5 @@ (function() { - SyntaxHighlighter.all(); - var filterType = document.getElementById('filterType'); var classFilter = document.getElementById('ClassFilter'); var classList = document.getElementById('ClassList'); diff --git a/Tools/jsdoc/cesium_template/static/javascript/prism.js b/Tools/jsdoc/cesium_template/static/javascript/prism.js new file mode 100644 index 000000000000..3678acfe80ca --- /dev/null +++ b/Tools/jsdoc/cesium_template/static/javascript/prism.js @@ -0,0 +1,6 @@ +/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ +var self=typeof window!="undefined"?window:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content)):t.util.type(e)==="Array"?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(p instanceof i)continue;a.lastIndex=0;var d=a.exec(p);if(d){l&&(c=d[1].length);var v=d.index-1+c,d=d[0].slice(c),m=d.length,g=v+m,y=p.slice(0,v+1),b=p.slice(g+1),w=[h,1];y&&w.push(y);var E=new i(u,f?t.tokenize(d,f):d);w.push(E);b&&w.push(b);Array.prototype.splice.apply(s,w)}}}return s},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e,r,i){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]")return e.map(function(t){return n.stringify(t,r,e)}).join("");var s={type:e.type,content:n.stringify(e.content,r,i),tag:"span",classes:["token",e.type],attributes:{},language:r,parent:i};s.type=="comment"&&(s.attributes.spellcheck="true");t.hooks.run("wrap",s);var o="";for(var u in s.attributes)o+=u+'="'+(s.attributes[u]||"")+'"';return"<"+s.tag+' class="'+s.classes.join(" ")+'" '+o+">"+s.content+""+s.tag+">"};if(!self.document){if(!self.addEventListener)return self.Prism;self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return self.Prism}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}return self.Prism}();typeof module!="undefined"&&module.exports&&(module.exports=Prism);; +Prism.languages.markup={comment://g,prolog:/<\?.+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});; +Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/ig};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/