From 4df632b93fbbbc70ef6fd7f86bf83a940f982dda Mon Sep 17 00:00:00 2001 From: neopheus Date: Mon, 24 Jul 2017 11:29:46 +0200 Subject: [PATCH] Update comments (#4128) * Update Doc * Update Doc - 2 --- src/canvas.class.js | 8 ++++---- src/filters/2d_backend.class.js | 2 +- src/filters/filter_generator.js | 2 +- src/filters/grayscale_filter.class.js | 2 +- src/point.class.js | 4 ++-- src/shapes/active_selection.class.js | 2 +- src/shapes/text.class.js | 10 +++++----- src/shapes/textbox.class.js | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/canvas.class.js b/src/canvas.class.js index d16c13e6..516c3e47 100644 --- a/src/canvas.class.js +++ b/src/canvas.class.js @@ -89,7 +89,7 @@ centeredRotation: false, /** - * Indicates which key enable centered Transfrom + * Indicates which key enable centered Transform * values: 'altKey', 'shiftKey', 'ctrlKey'. * If `null` or 'none' or any other string that is not a modifier key * feature is disabled feature disabled. @@ -1193,7 +1193,7 @@ // Cache all targets where their bounding box contains point. var target, i = objects.length, normalizedPointer, subTarget; // Do not check for currently grouped objects, since we check the parent group itself. - // untill we call this function specifically to search inside the activeGroup + // until we call this function specifically to search inside the activeGroup while (i--) { if (this._checkTarget(pointer, objects[i])) { target = objects[i]; @@ -1350,7 +1350,7 @@ }, /** - * Copys the the entire inline style from one element (fromEl) to another (toEl) + * Copy the entire inline style from one element (fromEl) to another (toEl) * @private * @param {Element} fromEl Element style is copied from * @param {Element} toEl Element copied style is applied to @@ -1473,7 +1473,7 @@ /** * Discards currently active object and fire events. If the function is called by fabric - * as a consequence of a mouse event, the event is passed as a parmater and + * as a consequence of a mouse event, the event is passed as a parameter and * sent to the fire function for the custom events. When used as a method the * e param does not have any application. * @param {event} e diff --git a/src/filters/2d_backend.class.js b/src/filters/2d_backend.class.js index 8d041d86..a37e190d 100644 --- a/src/filters/2d_backend.class.js +++ b/src/filters/2d_backend.class.js @@ -19,7 +19,7 @@ /** * Experimental. This object is a sort of repository of help layers used to avoid * of recreating them during frequent filtering. If you are previewing a filter with - * a slider you problably do not want to create help layers every filter step. + * a slider you probably do not want to create help layers every filter step. * in this object there will be appended some canvases, created once, resized sometimes * cleared never. Clearing is left to the developer. **/ diff --git a/src/filters/filter_generator.js b/src/filters/filter_generator.js index bd0d5df4..1932d53c 100644 --- a/src/filters/filter_generator.js +++ b/src/filters/filter_generator.js @@ -71,7 +71,7 @@ matrix: matrices[key], /** - * Lock the matrix export for this kind of static, parameterless filters. + * Lock the matrix export for this kind of static, parameter less filters. */ mainParameter: false, /** diff --git a/src/filters/grayscale_filter.class.js b/src/filters/grayscale_filter.class.js index c16d7e0f..debff967 100644 --- a/src/filters/grayscale_filter.class.js +++ b/src/filters/grayscale_filter.class.js @@ -57,7 +57,7 @@ /** - * Grayscale mode, between 'average', 'lighntess', 'luminosity' + * Grayscale mode, between 'average', 'lightness', 'luminosity' * @param {String} type * @default */ diff --git a/src/point.class.js b/src/point.class.js index 25beb61d..ca7b84f3 100644 --- a/src/point.class.js +++ b/src/point.class.js @@ -118,7 +118,7 @@ }, /** - * Miltiplies this point by a value and returns a new one + * Multiplies this point by a value and returns a new one * TODO: rename in scalarMultiply in 2.0 * @param {Number} scalar * @return {fabric.Point} @@ -128,7 +128,7 @@ }, /** - * Miltiplies this point by a value + * Multiplies this point by a value * TODO: rename in scalarMultiplyEquals in 2.0 * @param {Number} scalar * @return {fabric.Point} thisArg diff --git a/src/shapes/active_selection.class.js b/src/shapes/active_selection.class.js index 81d3256e..d6156274 100644 --- a/src/shapes/active_selection.class.js +++ b/src/shapes/active_selection.class.js @@ -90,7 +90,7 @@ }, /** - * Returns string represenation of a group + * Returns string representation of a group * @return {String} */ toString: function() { diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index c95a73b7..1c1a63f5 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -777,10 +777,10 @@ /** * measure and return the width of a single character. - * possibly overridden to accomodate differente measure logic or + * possibly overridden to accommodate different measure logic or * to hook some external lib for character measurement * @private - * @param {String} char char to be measured + * @param {String} char to be measured * @param {Object} charStyle style of char to be measured * @param {String} [previousChar] previous char * @param {Object} [prevCharStyle] style of previous char @@ -876,7 +876,7 @@ prevGrapheme = grapheme; } // this latest bound box represent the last character of the line - // to simplify cursor handling in interactive mdoe. + // to simplify cursor handling in interactive mode. lineBounds[i] = { left: graphemeInfo ? graphemeInfo.left + graphemeInfo.width : 0, width: 0, @@ -1086,7 +1086,7 @@ * @param {String} method * @param {CanvasRenderingContext2D} ctx Context to render on * @param {Number} lineIndex - * @param {Number} i + * @param {Number} charIndex * @param {String} _char * @param {Number} left Left coordinate * @param {Number} top Top coordinate @@ -1171,7 +1171,7 @@ /** * Measure a single line given its index. Used to calculate the initial - * text bouding box. The values are calculated and stored in __lineWidths cache. + * text bounding box. The values are calculated and stored in __lineWidths cache. * @private * @param {Number} lineIndex line number * @return {Number} Line width diff --git a/src/shapes/textbox.class.js b/src/shapes/textbox.class.js index 6ef8bccb..1abfa4a3 100644 --- a/src/shapes/textbox.class.js +++ b/src/shapes/textbox.class.js @@ -100,7 +100,7 @@ this._set('width', this.dynamicMinWidth); } if (this.textAlign === 'justify') { - // once text is misured we need to make space fatter to make justified text. + // once text is measured we need to make space fatter to make justified text. this.enlargeSpaces(); } // clear cache and re-calculate height @@ -330,7 +330,7 @@ /** * Gets lines of text to render in the Textbox. This function calculates - * text wrapping on the fly everytime it is called. + * text wrapping on the fly every time it is called. * @param {String} text text to split * @returns {Array} Array of lines in the Textbox. * @override