Created
April 23, 2015 08:30
-
-
Save thachnuida/3f630678b484d262fb53 to your computer and use it in GitHub Desktop.
JSDoc example (Ref: http://ovaraksin.blogspot.com/2011/09/quick-practical-introduction-to-jsdoc.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileOverview | |
* @author <a href="mailto:[email protected]">Oleg Varaksin</a> | |
* @version 0.2 | |
*/ | |
/** | |
* Whiteboard designer class for element drawing. | |
* @class | |
* @param witeboardConfig whiteboard's configuration {@link WhiteboardConfig} | |
* @param whiteboardId whiteboard's id | |
* @param user user (user name) working with this whiteboard | |
* @param pubSubUrl URL for bidirectional communication | |
* @param pubSubTransport transport protocol "long-polling" | "streaming" | "websocket" | |
*/ | |
WhiteboardDesigner = function(witeboardConfig, whiteboardId, user, pubSubUrl, pubSubTransport) { | |
/** | |
* Whiteboard's configuration {@link WhiteboardConfig}. | |
* @public | |
* @type WhiteboardConfig | |
*/ | |
this.config = witeboardConfig; | |
/** | |
* Whiteboard's id. | |
* @public | |
* @type uuid | |
*/ | |
this.whiteboardId = whiteboardId; | |
/** | |
* User which works with this whiteboard. | |
* @public | |
* @type string | |
*/ | |
this.user = user; | |
/** | |
* URL for bidirectional communication. | |
* @public | |
* @type string | |
*/ | |
this.pubSubUrl = pubSubUrl; | |
/** | |
* Transport protocol "long-polling" | "streaming" | "websocket". | |
* @public | |
* @type string | |
*/ | |
this.pubSubTransport = pubSubTransport; | |
/** | |
* Logging flag, true - logging is visible, false - otherwise. | |
* @public | |
* @type boolean | |
*/ | |
this.logging = false; | |
/** | |
* Raphael's canvas. | |
* @private | |
* @type Raphael's paper | |
*/ | |
var paper = Raphael(this.config.ids.whiteboard, whiteboard.width(), whiteboard.height()); | |
... | |
/** Draws image with default properties. | |
* @public | |
* @param inputUrl image URL. | |
* @param width image width. | |
* @param height image height. | |
*/ | |
this.drawImage = function(inputUrl, width, height) { | |
... | |
} | |
/** Gets currently selected whiteboard element. | |
* @public | |
* @returns {Raphael's element} currently selected element | |
*/ | |
this.getSelectedObject = function() { | |
... | |
} | |
... | |
/** Outputs debug messages. | |
* @private | |
* @param msg message | |
*/ | |
var logDebug = function(msg) { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment