Skip to content

Commit

Permalink
Add a couple JSDoc comments that yuidoc doesn't complain about
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Nov 25, 2013
1 parent 706293d commit c6b1f16
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/genDocs
Expand Up @@ -6,7 +6,7 @@ tsFiles=$(find . -type f -name *.ts | grep -v [.]d[.]ts | grep -v /test/ | grep


# starts yuidoc in server mode
yuidoc -e .ts -o target/docs --server src/main/webapp/app/core/js/
yuidoc -e .ts -o target/docs --server src/main/webapp/app/forcegraph/js/



14 changes: 10 additions & 4 deletions hawtio-web/src/main/webapp/app/core/js/CodeEditor.ts
Expand Up @@ -18,9 +18,7 @@ module CodeEditor {

$scope.preferences = GlobalCodeMirrorOptions;

/**
* If any of the preferences change, make sure to save them automatically
*/
// If any of the preferences change, make sure to save them automatically
$scope.$watch("preferences", function(newValue, oldValue) {
if (newValue !== oldValue) {
// such a cheap and easy way to update the example view :-)
Expand All @@ -45,6 +43,10 @@ module CodeEditor {

/**
* Auto formats the CodeMirror editor content to pretty print
*
* @method autoFormatEditor
* @param {CodeMirrorEditor} editor
* @return {void}
*/
export function autoFormatEditor(editor:CodeMirrorEditor) {
if (editor) {
Expand All @@ -58,7 +60,11 @@ module CodeEditor {
}

/**
* Used to configures the default editor settings (Per Editor Instance)
* Used to configures the default editor settings (per Editor Instance)
*
* @method createEditorSettings
* @param {Object} options
* @returns {Object}
*/
export function createEditorSettings(options:any = {}) {
options.extraKeys = options.extraKeys || {};
Expand Down
10 changes: 10 additions & 0 deletions hawtio-web/src/main/webapp/app/core/js/coreHelpers.ts
Expand Up @@ -19,6 +19,11 @@ var numberTypeNames = {

/**
* Returns the number of lines in the given text
*
* @method lineCount
* @param {String} value
* @return {Number}
*
*/
function lineCount(value): number {
var rows = 0;
Expand Down Expand Up @@ -89,6 +94,11 @@ function trimQuotes(text:string) {
*
* If the value is null an empty array is returned.
* If the value is a non empty string then the string is split by commas
*
* @method toSearchArgumentArray
* @param {Object} value
* @return {String[]}
*
*/
function toSearchArgumentArray(value): string[] {
if (value) {
Expand Down
@@ -1,3 +1,8 @@
/**
* Force Graph plugin & directive
*
* @module ForceGraph
*/
module ForceGraph {
var pluginName = 'forceGraph';

Expand Down
12 changes: 11 additions & 1 deletion hawtio-web/src/main/webapp/app/forcegraph/js/graphBuilder.ts
@@ -1,11 +1,21 @@
module ForceGraph {

/**
* GraphBuilder
*
* @class GraphBuilder
*/
export class GraphBuilder {

private nodes = {};
private links = [];
private linkTypes = {};

/**
* Adds a node to this graph
* @method addNode
* @param {Object} node
*/
public addNode(node) {
if(!this.nodes[node.id]) {
this.nodes[node.id] = node;
Expand Down Expand Up @@ -115,4 +125,4 @@ module ForceGraph {
}
}
}
}
}

0 comments on commit c6b1f16

Please sign in to comment.