From 3cb00000586340276998144d202d7af35c47ae36 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Fri, 6 Nov 2015 22:28:20 +0100 Subject: tab to space, block comments to line comments --- src/color.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/color.js') diff --git a/src/color.js b/src/color.js index 956693c..1564bba 100644 --- a/src/color.js +++ b/src/color.js @@ -2,27 +2,27 @@ SVG.Color = function(color) { var match - /* initialize defaults */ + // initialize defaults this.r = 0 this.g = 0 this.b = 0 - /* parse color */ + // parse color if (typeof color === 'string') { if (SVG.regex.isRgb.test(color)) { - /* get rgb values */ + // get rgb values match = SVG.regex.rgb.exec(color.replace(/\s/g,'')) - /* parse numeric values */ + // parse numeric values this.r = parseInt(match[1]) this.g = parseInt(match[2]) this.b = parseInt(match[3]) } else if (SVG.regex.isHex.test(color)) { - /* get hex values */ + // get hex values match = SVG.regex.hex.exec(fullHex(color)) - /* parse numeric values */ + // parse numeric values this.r = parseInt(match[1], 16) this.g = parseInt(match[2], 16) this.b = parseInt(match[3], 16) @@ -68,13 +68,13 @@ SVG.extend(SVG.Color, { } // Get morphed color at given position , at: function(pos) { - /* make sure a destination is defined */ + // make sure a destination is defined if (!this.destination) return this - /* normalise pos */ + // normalise pos pos = pos < 0 ? 0 : pos > 1 ? 1 : pos - /* generate morphed color */ + // generate morphed color return new SVG.Color({ r: ~~(this.r + (this.destination.r - this.r) * pos) , g: ~~(this.g + (this.destination.g - this.g) * pos) -- cgit v1.2.3