Skip to content

Commit

Permalink
Change all @return tags to @returns
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcaldas committed Sep 24, 2017
1 parent 99fc9e7 commit 397dde0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sandbox/rd3g.sandbox.bundle.js

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

14 changes: 7 additions & 7 deletions src/components/Graph/helper.jsx
Expand Up @@ -27,7 +27,7 @@ import Node from '../Node/';
* @param {function[]} linkCallbacks - same as {@link #buildGraph|linkCallbacks in buildGraph}.
* @param {boolean} someNodeHighlighted - same as {@link #buildGraph|someNodeHighlighted in buildGraph}.
* @param {number} transform - value that indicates the amount of zoom transformation.
* @return {Object} returns an object that aggregates all props for creating respective Link component instance.
* @returns {Object} returns an object that aggregates all props for creating respective Link component instance.
* @memberof Graph/helper
*/
function _buildLinkProps(source, target, nodes, links, config, linkCallbacks, someNodeHighlighted, transform) {
Expand Down Expand Up @@ -82,7 +82,7 @@ function _buildLinkProps(source, target, nodes, links, config, linkCallbacks, so
* @param {function[]} linkCallbacks - same as {@link #buildGraph|linkCallbacks in buildGraph}.
* @param {boolean} someNodeHighlighted - same as {@link #buildGraph|someNodeHighlighted in buildGraph}.
* @param {number} transform - value that indicates the amount of zoom transformation.
* @return {Object[]} returns the generated array of Link components.
* @returns {Object[]} returns the generated array of Link components.
* @memberof Graph/helper
*/
function _buildNodeLinks(nodeId, nodes, links, config, linkCallbacks, someNodeHighlighted, transform) {
Expand Down Expand Up @@ -124,7 +124,7 @@ function _buildNodeLinks(nodeId, nodes, links, config, linkCallbacks, someNodeHi
* @param {function[]} nodeCallbacks - same as {@link #buildGraph|nodeCallbacks in buildGraph}.
* @param {boolean} someNodeHighlighted - same as {@link #buildGraph|someNodeHighlighted in buildGraph}.
* @param {number} transform - value that indicates the amount of zoom transformation.
* @return {Object} returns object that contain Link props ready to be feeded to the Link component.
* @returns {Object} returns object that contain Link props ready to be feeded to the Link component.
* @memberof Graph/helper
*/
function _buildNodeProps(node, config, nodeCallbacks, someNodeHighlighted, transform) {
Expand Down Expand Up @@ -186,7 +186,7 @@ function _buildNodeProps(node, config, nodeCallbacks, someNodeHighlighted, trans
* @param {Object} config - an object containg rd3g consumer defined configurations [LINK README] for the graph.
* @param {boolean} someNodeHighlighted - this value is true when some node on the graph is highlighted.
* @param {number} transform - value that indicates the amount of zoom transformation.
* @return {Object} returns an object containg the generated nodes and links that form the graph. The result is
* @returns {Object} returns an object containg the generated nodes and links that form the graph. The result is
* returned in a way that can be consumed by es6 **destructuring assignment**.
* @memberof Graph/helper
*/
Expand Down Expand Up @@ -216,7 +216,7 @@ function buildGraph(nodes, nodeCallbacks, links, linkCallbacks, config, someNode
* <a href="https://github.com/d3/d3-force#simulation_force" target="_blank">https://github.com/d3/d3-force#simulation_force</a><br/>
* @param {number} width - the width of the container area of the graph.
* @param {number} height - the height of the container area of the graph.
* @return {Object} returns the simulation instance to be consumed.
* @returns {Object} returns the simulation instance to be consumed.
* @memberof Graph/helper
*/
function createForceSimulation(width, height) {
Expand All @@ -237,7 +237,7 @@ function createForceSimulation(width, height) {
* and the respective link value (if non existant will default to 1).
* @param {Object[]} graphLinks - an array of all graph links but all the links contain the source and target nodes
* objects.
* @return {Object.<string, Object>} an object containing a matrix of connections of the graph, for each nodeId,
* @returns {Object.<string, Object>} an object containing a matrix of connections of the graph, for each nodeId,
* there is an object that maps adjacent nodes ids (string) and their values (number).
* @memberof Graph/helper
*/
Expand Down Expand Up @@ -268,7 +268,7 @@ function initializeLinks(graphLinks) {
* that are optional for the user. Also it generates an index mapping, this maps nodes ids the their index in the array
* of nodes. This is needed because d3 callbacks such as node click and link click return the index of the node.
* @param {Object[]} graphNodes - the array of nodes provided by the rd3g consumer.
* @return {Object} returns the nodes ready to be used within rd3g with additional properties such as x, y
* @returns {Object} returns the nodes ready to be used within rd3g with additional properties such as x, y
* and highlighted values. Returns also the index mapping object of type Object.<number, string>.
* @memberof Graph/helper
*/
Expand Down
4 changes: 2 additions & 2 deletions src/components/Graph/index.jsx
Expand Up @@ -144,7 +144,7 @@ export default class Graph extends React.Component {

/**
* Handler for 'zoom' event within zoom config.
* @return {Object} returns the transformed elements within the svg graph area.
* @returns {Object} returns the transformed elements within the svg graph area.
*/
_zoomed = () => {
const transform = d3Event.transform;
Expand Down Expand Up @@ -230,7 +230,7 @@ export default class Graph extends React.Component {
* @param {Object} data
* @param {Array.<Object>} data.nodes - nodes of the graph to be created.
* @param {Array.<Object>} data.links - links that connect data.nodes.
* @returns {Object}
* @returnss {Object}
*/
_initializeGraphState(data) {
let graph;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Node/helper.js
Expand Up @@ -21,7 +21,7 @@ import CONST from './const';
* of d3 symbol.<br/>
* {@link https://github.com/d3/d3-shape/blob/master/README.md#symbol}
* @param {string} typeName - the string that specifies the symbol type (should be one of {@link #node-symbol-type|node.symbolType}).
* @return {Object} concrete instance of d3 symbol (defaults to circle).
* @returns {Object} concrete instance of d3 symbol (defaults to circle).
* @memberof Node/helper
*/
function _convertTypeToD3Symbol(typeName) {
Expand Down Expand Up @@ -50,7 +50,7 @@ function _convertTypeToD3Symbol(typeName) {
* @param {number} [size=80] - the size of the symbol.
* @param {string} [symbolTypeDesc='circle'] - the string containing the type of symbol that we want to build
* (should be one of {@link #node-symbol-type|node.symbolType}).
* @return {Object} concrete instance of d3 symbol.
* @returns {Object} concrete instance of d3 symbol.
* @memberof Node/helper
*/
function buildSvgSymbol(size=CONST.DEFAULT_NODE_SIZE, symbolTypeDesc=CONST.SYMBOLS.CIRCLE) {
Expand Down
10 changes: 5 additions & 5 deletions src/utils.js
Expand Up @@ -13,7 +13,7 @@ const MAX_DEPTH = 5;
* Checks whether a certain object property is from object type and is a non empty object.
* @param {Object} o - the object.
* @param {number|string} k - the object property.
* @return {boolean} returns true if o[k] is an non empty object.
* @returns {boolean} returns true if o[k] is an non empty object.
* @memberof utils
*/
function _isPropertyNestedObject(o, k) {
Expand All @@ -26,7 +26,7 @@ function _isPropertyNestedObject(o, k) {
* @param {Object} o2 - second object to compare with first.
* @param {number} [_depth=0] - this parameter serves only for internal usage.
* @memberof utils
* @return {boolean} returns true if o1 and o2 have exactly the same content, or are exactly the same object reference.
* @returns {boolean} returns true if o1 and o2 have exactly the same content, or are exactly the same object reference.
*/
function isDeepEqual(o1, o2, _depth=0) {
let diffs = [];
Expand Down Expand Up @@ -62,7 +62,7 @@ function isDeepEqual(o1, o2, _depth=0) {
* Checks whether or not a certain object is empty.
* NOTE: If the passed parameter is not an object the method return false.
* @param {Object} o - object whom emptiness we want to check.
* @return {boolean} true if the given object is n ft and object and is empty.
* @returns {boolean} true if the given object is n ft and object and is empty.
* @memberof utils
*/
function isObjectEmpty(o) {
Expand All @@ -76,7 +76,7 @@ function isObjectEmpty(o) {
* @param {Object} o2 - object that will override o1 properties.
* @memberof utils
* @param {int} [_depth=0] - the depth at which we are merging the object.
* @return {Object} object that is the result of merging o1 and o2, being o2 properties priority overriding
* @returns {Object} object that is the result of merging o1 and o2, being o2 properties priority overriding
* existent o1 properties.
*/
function merge(o1={}, o2={}, _depth=0) {
Expand All @@ -100,7 +100,7 @@ function merge(o1={}, o2={}, _depth=0) {
* Helper function for customized error logging.
* @param {string} component - the name of the component where the error is to be thrown.
* @param {string} msg - the message contain a more detailed explanation about the error.
* @return {Error} the thrown error.
* @returns {Error} the thrown error.
* @memberof utils
*/
function throwErr(component, msg) {
Expand Down

0 comments on commit 397dde0

Please sign in to comment.