From 8395541298a14647bc520e6d1675fcfc6fd674f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 29 Dec 2013 15:44:26 +0100 Subject: [PATCH] Clean up docs and fix spelling mistakes. --- node_modules/.gitignore | 5 +++-- src/core/Base.js | 2 +- src/dom/DomElement.js | 2 +- src/dom/DomEvent.js | 2 +- src/path/Curve.js | 4 ++-- src/path/PathFitter.js | 5 +++++ src/path/PathFlattener.js | 5 +++++ src/ui/CanvasView.js | 2 +- src/util/Numerical.js | 7 ++++++- 9 files changed, 25 insertions(+), 9 deletions(-) diff --git a/node_modules/.gitignore b/node_modules/.gitignore index f03c65d0..b2703914 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -1,7 +1,8 @@ .bin canvas +grunt* +jsdoc jsdom +prepro request uglify-js -prepro -grunt* diff --git a/src/core/Base.js b/src/core/Base.js index aa6fe49c..73406462 100644 --- a/src/core/Base.js +++ b/src/core/Base.js @@ -211,7 +211,7 @@ Base.inject(/** @lends Base# */{ /** * Reads all readable arguments from the list, handling nested arrays - * seperately. + * separately. * @param {Array} list the list to read from, either an arguments object * or a normal array. * @param {Number} start the index at which to start reading in the list diff --git a/src/dom/DomElement.js b/src/dom/DomElement.js index 46fa1ec7..15a38fca 100644 --- a/src/dom/DomElement.js +++ b/src/dom/DomElement.js @@ -46,7 +46,7 @@ var DomElement = new function() { return res; } - return { + return /** @lends DomElement */{ create: function(nodes, parent) { var isArray = Array.isArray(nodes), res = create(isArray ? nodes : arguments, isArray ? parent : null); diff --git a/src/dom/DomEvent.js b/src/dom/DomEvent.js index 49b66407..70f2e33b 100644 --- a/src/dom/DomEvent.js +++ b/src/dom/DomEvent.js @@ -15,7 +15,7 @@ * @namespace * @private */ -var DomEvent = { +var DomEvent = /** @lends DomEvent */{ add: function(el, events) { for (var type in events) el.addEventListener(type, events[type], false); diff --git a/src/path/Curve.js b/src/path/Curve.js index 2331a317..a1bc7458 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -556,7 +556,7 @@ statics: { }, getParameterOf: function(v, x, y) { - // Handle beginnings and end seperately, as they are not detected + // Handle beginnings and end separately, as they are not detected // sometimes. var tolerance = /*#=*/ Numerical.TOLERANCE; if (Math.abs(v[0] - x) < tolerance && Math.abs(v[1] - y) < tolerance) @@ -675,7 +675,7 @@ statics: { c = v1 - v0, count = Numerical.solveQuadratic(a, b, c, roots), // Add some tolerance for good roots, as t = 0 / 1 are added - // seperately anyhow, and we don't want joins to be added with + // separately anyhow, and we don't want joins to be added with // radiuses in getStrokeBounds() tMin = /*#=*/ Numerical.TOLERANCE, tMax = 1 - tMin; diff --git a/src/path/PathFitter.js b/src/path/PathFitter.js index b179529e..86b79c84 100644 --- a/src/path/PathFitter.js +++ b/src/path/PathFitter.js @@ -15,6 +15,11 @@ // from "Graphics Gems", Academic Press, 1990 // Modifications and optimisations of original algorithm by Juerg Lehni. +/** + * @name PathFitter + * @class + * @private + */ var PathFitter = Base.extend({ initialize: function(path, error) { this.points = []; diff --git a/src/path/PathFlattener.js b/src/path/PathFlattener.js index adb6cf4c..186e633c 100644 --- a/src/path/PathFlattener.js +++ b/src/path/PathFlattener.js @@ -10,6 +10,11 @@ * All rights reserved. */ +/** + * @name PathFlattener + * @class + * @private + */ var PathFlattener = Base.extend({ initialize: function(path) { this.curves = []; // The curve values as returned by getValues() diff --git a/src/ui/CanvasView.js b/src/ui/CanvasView.js index 03137cfb..a1253cb2 100644 --- a/src/ui/CanvasView.js +++ b/src/ui/CanvasView.js @@ -143,7 +143,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{ return false; } - return { + return /** @lends CanvasView# */{ /** * Returns true if event was stopped, false otherwise, whether handler * was called or not! diff --git a/src/util/Numerical.js b/src/util/Numerical.js index f5d717c0..3c6c4c51 100644 --- a/src/util/Numerical.js +++ b/src/util/Numerical.js @@ -10,6 +10,11 @@ * All rights reserved. */ +/** + * @name Numerical + * @namespace + * @private + */ var Numerical = new function() { // Lookup tables for abscissas and weights with values for n = 2 .. 16. @@ -75,7 +80,7 @@ var Numerical = new function() { }; } - return { + return /** @lends Numerical */{ TOLERANCE: TOLERANCE, // Precision when comparing against 0 EPSILON: EPSILON,